mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +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:
@@ -1896,7 +1896,7 @@ if ( ! class_exists( 'Admin_Metabox' ) ) {
|
||||
<div class="um-admin-tri">
|
||||
|
||||
<p><label for="_editable">Can user edit this field? <?php UM()->tooltip( __( 'This option allows you to set whether or not the user can edit the information in this field.', 'ultimate-member' ) ); ?></label>
|
||||
<input type="checkbox" name="_editable" id="_editable" value="1" <?php checked( isset( $this->edit_mode_value ) ? $this->edit_mode_value : 0 ) ?> />
|
||||
<input type="checkbox" name="_editable" id="_editable" value="1" <?php checked( null === $this->edit_mode_value || $this->edit_mode_value ) ?> />
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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