mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
Fix changing role by admin
This commit is contained in:
@@ -185,7 +185,7 @@ class UM_Admin_Users {
|
||||
foreach($users as $user_id){
|
||||
$ultimatemember->user->set( $user_id );
|
||||
// change role for non-wp admins or non-community admins only
|
||||
if ( !um_user('super_admin') || um_user('role') != 'admin' ) {
|
||||
if ( current_user_can('manage_options') || ( !um_user('super_admin') || um_user('role') != 'admin' ) ) {
|
||||
$ultimatemember->user->set_role( $new_role );
|
||||
} else {
|
||||
$admin_err = 1;
|
||||
|
||||
Reference in New Issue
Block a user