mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 13:43:38 +09:00
- fixed default avatar URL for sites at subfolder;
- user registration optimization (removed edit profile handlers on user registration); - fixed "can edit" checkbox at Forms add field modal window;
This commit is contained in:
@@ -990,11 +990,11 @@ if ( ! empty( $um_roles ) ) {
|
||||
$all_users = get_users( $args );
|
||||
//update roles for users
|
||||
foreach ( $all_users as $k => $user ) {
|
||||
$user_roleID = get_user_meta( $user->ID, 'role', true );
|
||||
$role_slug = get_user_meta( $user->ID, 'role', true );
|
||||
|
||||
if ( ! empty( $user_roleID ) ) {
|
||||
$userdata = get_userdata( $user->ID );
|
||||
$userdata->add_role( 'um_' . $user_roleID );
|
||||
if ( ! empty( $role_slug ) ) {
|
||||
$user_object = get_userdata( $user->ID );
|
||||
$user_object->add_role( 'um_' . $role_slug );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user