WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Theme causing login failure

[Resolved] Theme causing login failure

Viewing 1 replies (of 1 total)
  • Nevermind I figured it out but for anyone else getting the generic ERROR message when attempting to login, here one reason why that might happen…

    I have a function running that prevents users from viewing the back end:

    add_action('admin_init', 'restrict_access_admin_panel', 1);
    function restrict_access_admin_panel(){
      global $current_user;
      get_currentuserinfo();
      if ($current_user->user_level <  4) {
        wp_redirect( get_bloginfo('url') );
        exit;
      }
    }

    This was causing the issue, probably because of the redirect? I’m not sure.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Theme causing login failure’ is closed to new replies.