Skip to:

Users able to Login without Activating Their Accounts

  • mochapng


    For some reason, people are able to log into the website without activating their account first. When doing so, their account gets bugged out:

    – They see the blue admin bar on top when they shouldn’t (I disabled it so only admins see the bar).
    – Shown as offline
    – Friendship requests do not work and get bugged out.

    Could you offer me some assistance as to why this may be happening? Sometimes they are able to log in without activating. Other times, they get “ERROR: Your account has not been activated. Check your email for the activation link.”

    The theme I use is not custom ( However, I did switch it back to the default theme to check (Twenty Nineteen) and unfortunately, the problem still persists. I’ve tried disabling plugins as well and I could not seem to isolate the problem.

    In, the page generates the IDs of all the accounts that are not activated yet. Is there a way for me to fetch the user IDs for those who are not activated yet and redirect them to a custom page when they log-in? Sometimes unactivated accounts are able to log-in. As a temporary solution while I figure out the root of the problem, my plan was to:

    Fetch all the user IDs of those who are not activated yet
    Upon login, redirect them to a custom page that explains that their access is limited and to activate their account to gain access to everything.
    My idea was:

    function unactivated_user_redirect( $user_login, $user ) {
        // Grab unactivated user IDs and store in array
        // Check to see if $user ID matches ID in array.
           // If matches redirect to wp_redirect(;
    add_action('wp_login', 'unactivated_user_redirect', 10, 2);
  • You must be logged in to reply to this topic.
Skip to toolbar