1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-24 15:23:11 +02:00
This commit is contained in:
Ryan Cramer
2018-04-30 05:56:36 -04:00
parent ecdd3a3895
commit 8c18e3bf0d

View File

@@ -153,7 +153,7 @@ class ProcessUser extends ProcessPageType {
if($userAdminAll->id && !$user->hasPermission($userAdminAll)) {
// system has user-admin-all permission, and user doesn't have it
// so limit them only to the permission user-admin-[role] roles that they have assigned
$roles = '';
$roles = array();
foreach($user->getPermissions() as $permission) {
if(strpos($permission->name, 'user-admin-') !== 0) continue;
$roleName = str_replace('user-admin-', '', $permission->name);