forked from mirrors/easyappointments
Update the session language and remove password from the $account array
This commit is contained in:
parent
c85d47befc
commit
48122c4cd3
1 changed files with 7 additions and 1 deletions
|
@ -109,7 +109,7 @@ class Account extends EA_Controller {
|
|||
'language',
|
||||
'settings'
|
||||
]);
|
||||
|
||||
|
||||
$this->users_model->only($account['settings'], [
|
||||
'username',
|
||||
'password',
|
||||
|
@ -117,12 +117,18 @@ class Account extends EA_Controller {
|
|||
'calendar_view'
|
||||
]);
|
||||
|
||||
if (empty($account['password']))
|
||||
{
|
||||
unset($account['password']);
|
||||
}
|
||||
|
||||
$this->users_model->save($account);
|
||||
|
||||
session([
|
||||
'user_email' => $account['email'],
|
||||
'username' => $account['settings']['username'],
|
||||
'timezone' => $account['timezone'],
|
||||
'language' => $account['language'],
|
||||
]);
|
||||
|
||||
response();
|
||||
|
|
Loading…
Reference in a new issue