mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 21:53:43 +09:00
- fixed reset password limit flushing
This commit is contained in:
@@ -177,6 +177,7 @@ add_action( 'um_on_login_before_redirect', 'um_store_lastlogin_timestamp', 10, 1
|
||||
function um_store_lastlogin_timestamp_( $login ) {
|
||||
$user = get_user_by( 'login', $login );
|
||||
um_store_lastlogin_timestamp( $user->ID );
|
||||
delete_user_meta( $user->ID, 'password_rst_attempts' );
|
||||
}
|
||||
add_action( 'wp_login', 'um_store_lastlogin_timestamp_' );
|
||||
|
||||
|
||||
@@ -53,28 +53,30 @@ function um_remove_special_users_from_list( $query_args, $args ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) || UM()->options()->get( 'account_hide_in_directory' ) ) {
|
||||
$query_args['meta_query'][] = array(
|
||||
"relation" => "OR",
|
||||
array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => '',
|
||||
'compare' => 'NOT EXISTS'
|
||||
),
|
||||
array(
|
||||
"relation" => "AND",
|
||||
if ( UM()->options()->get( 'account_hide_in_directory' ) ) {
|
||||
if ( ! UM()->roles()->um_user_can( 'can_access_private_profile' ) ) {
|
||||
$query_args['meta_query'][] = array(
|
||||
"relation" => "OR",
|
||||
array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => __('Yes','ultimate-member'),
|
||||
'compare' => 'NOT LIKE'
|
||||
'value' => '',
|
||||
'compare' => 'NOT EXISTS'
|
||||
),
|
||||
array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => 'Yes',
|
||||
'compare' => 'NOT LIKE'
|
||||
"relation" => "AND",
|
||||
array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => __('Yes','ultimate-member'),
|
||||
'compare' => 'NOT LIKE'
|
||||
),
|
||||
array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => 'Yes',
|
||||
'compare' => 'NOT LIKE'
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$roles = um_user( 'can_view_roles' );
|
||||
|
||||
Reference in New Issue
Block a user