- fixed displaying ability to switch between users;

This commit is contained in:
Nikita Sinelnikov
2021-08-05 17:13:05 +03:00
parent 351e2ecb2d
commit 290c3ad662
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
/**
* Exclude restricted post from query if there is a single query that exclude post_not_in by default in \WP_Query
*
*
* @param string $where
* @param \WP_Query $query
*
+2 -2
View File
@@ -48,7 +48,7 @@ function um_admin_user_actions_hook( $actions, $user_id ) {
$actions['um_delete'] = array( 'label' => __( 'Delete this user', 'ultimate-member' ) );
}
if ( current_user_can( 'manage_options' ) ) {
if ( current_user_can( 'manage_options' ) && ! is_super_admin( $user_id ) ) {
$actions['um_switch_user'] = array( 'label' => __( 'Login as this user', 'ultimate-member' ) );
}
@@ -295,4 +295,4 @@ function um_before_update_profile( $changes, $user_id ) {
return $changes;
}
add_filter( 'um_before_update_profile','um_before_update_profile', 10, 2 );
add_filter( 'um_before_update_profile','um_before_update_profile', 10, 2 );