Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stop users accessing /wp-admin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of imath
    imath
    Moderator

    @imath

    Hello,

    You can try to add this in the functions.php of your active theme :
    `function henry_restrict_access_admin_panel(){
    global $current_user;
    get_currentuserinfo();
    if ( $current_user->user_level < 1 ) {

    $redirect = bp_core_get_user_domain( $current_user->ID );

    wp_redirect( $redirect );
    exit;
    }
    }
    add_action(‘admin_init’, ‘henry_restrict_access_admin_panel’, 1);`

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    ? hmmm was going to post a variation on the above code but bp.org refuses it *shrug*

    Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    You already said that – aka – Stop hitting yourself

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.