mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 15:23:11 +02:00
Fix issue processwire/processwire-issues#580
This commit is contained in:
@@ -153,7 +153,7 @@ class ProcessUser extends ProcessPageType {
|
|||||||
if($userAdminAll->id && !$user->hasPermission($userAdminAll)) {
|
if($userAdminAll->id && !$user->hasPermission($userAdminAll)) {
|
||||||
// system has user-admin-all permission, and user doesn't have it
|
// 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
|
// so limit them only to the permission user-admin-[role] roles that they have assigned
|
||||||
$roles = '';
|
$roles = array();
|
||||||
foreach($user->getPermissions() as $permission) {
|
foreach($user->getPermissions() as $permission) {
|
||||||
if(strpos($permission->name, 'user-admin-') !== 0) continue;
|
if(strpos($permission->name, 'user-admin-') !== 0) continue;
|
||||||
$roleName = str_replace('user-admin-', '', $permission->name);
|
$roleName = str_replace('user-admin-', '', $permission->name);
|
||||||
|
Reference in New Issue
Block a user