Skip to content

Commit

Permalink
Only update email if password locking isn't set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 23, 2015
1 parent d26c40b commit e455b2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/admin/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ public function postEdit($id = null)
$user->first_name = Input::get('first_name');
$user->last_name = Input::get('last_name');
$user->employee_num = Input::get('employee_num');
$user->email = Input::get('email');
$user->activated = Input::get('activated', $user->activated);
$user->permissions = Input::get('permissions');
$user->jobtitle = Input::get('jobtitle');
Expand All @@ -310,6 +309,11 @@ public function postEdit($id = null)
$user->password = $password;
}

// Do we want to update the user email?
if (!Config::get('app.lock_passwords')) {
$user->email = Input::get('email');
}

// Get the current user groups
$userGroups = $user->groups()->lists('group_id', 'group_id');

Expand Down

0 comments on commit e455b2a

Please sign in to comment.