mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix admin navigation
This commit is contained in:
@@ -8,13 +8,18 @@
|
||||
global $ultimatemember;
|
||||
|
||||
if ( is_admin() ) return false;
|
||||
if ( !isset( $_REQUEST['um_action'] ) ) return false;
|
||||
if ( ! is_user_logged_in() ) return false;
|
||||
if ( ! isset( $_REQUEST['um_action'] ) ) return false;
|
||||
if ( isset( $_REQUEST['uid'] ) && !$ultimatemember->user->user_exists_by_id( $_REQUEST['uid'] ) ) return false;
|
||||
|
||||
if ( isset( $_REQUEST['uid'] ) ) {
|
||||
if ( is_super_admin( $_REQUEST['uid'] ) )
|
||||
wp_die('Super administrators can not be modified.');
|
||||
}
|
||||
|
||||
if ( isset( $_REQUEST['um_action'] ) && ! current_user_can( 'edit_users' ) ){
|
||||
wp_die( __( 'You do not have enough permissions to do that.','ultimatemember') );
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['uid'])){
|
||||
$uid = $_REQUEST['uid'];
|
||||
|
||||
Reference in New Issue
Block a user