• Resolved steverino2

    (@steverino2)


    Help! As admin I cannot login from any browser. The browser I apparently was logged into the site on closed improperly last night, and this morning it does not remember it was logged in. I had single device login enabled on the plug in with no time limit on login. Now I cannot login to the site from anywhere or any browser and am totally locked out. Anyway to bypass the plug in as admin and get into the site??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter steverino2

    (@steverino2)

    Never mind, I just deactivated the plugin via FTP.

    Plugin Author Joel James

    (@joelcj91)

    Hey @steverino2,

    Hope you could login again. You can always allow admins to have unlimited logins by using a filter.

    function loggedin_bypass_roles( $prevent, $user_id ) {
        // Array of roles to bypass.
        $allowed_roles = array( 'administrator' );
    
        $user = get_user_by( 'id', $user_id );
    
        $roles = ! empty( $user->roles ) ? $user->roles : array();
    
        $bypassed = array_intersect( $roles, $allowed_roles );
    
        return ! empty( $bypassed );
    }
    
    add_filter( 'loggedin_bypass', 'loggedin_bypass_roles', 10, 2 );
    Thread Starter steverino2

    (@steverino2)

    I did get in, had to deactivate the plugin by changing the plugin’s folder name via FTP, then logged in and reactivated it. Thanks for the code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Admin is locked out of site’ is closed to new replies.