mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-24 08:53:05 +03:00
Unset the "password" and "salt" parameter when getting a user or a provider
This commit is contained in:
parent
a01acc5773
commit
6d413ffdfc
2 changed files with 18 additions and 2 deletions
|
@ -327,7 +327,11 @@ class Providers_model extends EA_Model {
|
|||
|
||||
$provider['settings'] = $this->db->get_where('user_settings', ['id_users' => $provider_id])->row_array();
|
||||
|
||||
unset($provider['settings']['id_users']);
|
||||
unset(
|
||||
$provider['settings']['id_users'],
|
||||
$provider['settings']['password'],
|
||||
$provider['settings']['salt'],
|
||||
);
|
||||
|
||||
$service_provider_connections = $this->db->get_where('services_providers', ['id_users' => $provider_id])->result_array();
|
||||
|
||||
|
|
|
@ -219,7 +219,11 @@ class Users_model extends EA_Model {
|
|||
|
||||
$user['settings'] = $this->db->get_where('user_settings', ['id_users' => $user_id])->row_array();
|
||||
|
||||
unset($user['settings']['id_users']);
|
||||
unset(
|
||||
$user['settings']['id_users'],
|
||||
$user['settings']['password'],
|
||||
$user['settings']['salt'],
|
||||
);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
@ -430,6 +434,14 @@ class Users_model extends EA_Model {
|
|||
foreach ($users as &$user)
|
||||
{
|
||||
$this->cast($user);
|
||||
|
||||
$user['settings'] = $this->db->get_where('user_settings', ['id_users' => $user['id']])->row_array();
|
||||
|
||||
unset(
|
||||
$user['settings']['id_users'],
|
||||
$user['settings']['password'],
|
||||
$user['settings']['salt']
|
||||
);
|
||||
}
|
||||
|
||||
return $users;
|
||||
|
|
Loading…
Reference in a new issue