diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 2e5bd3c353..32b599bd92 100755 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -689,14 +689,14 @@ class UsersController extends Controller // Get this user groups $userGroups = $user_to_clone->groups()->lists('name', 'id'); - // Get this user permissions - $userPermissions = null; - // Get a list of all the available groups $groups = Group::pluck('name', 'id'); // Get all the available permissions $permissions = config('permissions'); + $clonedPermissions = $user_to_clone->decodePermissions(); + + $userPermissions =Helper::selectedPermissionsArray($permissions, $clonedPermissions); //$this->encodeAllPermissions($permissions); $location_list = Helper::locationsList(); @@ -933,6 +933,8 @@ class UsersController extends Controller $actions .= ' '; + $actions .= ''; + if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords'))) { $actions .= ' '; } else {