• Hi,

    I’m using CleanLogin 1.7.5 with WordPress 4.6.1. I recently left my site unattended for a time and when I returned, I saw that my session had expired and I was presented with a standard WordPress-branded login form. Is there a way I can present a CleanLogin form instead? I didn’t see a shortcode for “Login Exipred”.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alberto Hornero

    (@hornero)

    Hi wlepera,

    Clean Login doesn’t include this feature.

    Do you know the name of this hook?

    Alberto.

    Thread Starter wlepera

    (@wlepera)

    I’m not sure how to answer the question…

    In my version of WordPress, I can see the message I received in the file wp-login.php:

    858     if ( $interim_login ) {
    859         if ( ! $errors->get_error_code() )
    <strong>860             $errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' );</strong>
    861     } else {
    862         // Some parts of this script use the main login form to display a message
    863         if      ( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
    864             $errors->add('loggedout', __('You are now logged out.'), 'message');
    865         elseif  ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] )
    866             $errors->add('registerdisabled', __('User registration is currently not allowed.'));
    867         elseif  ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] )
    868             $errors->add('confirm', __('Check your email for the confirmation link.'), 'message');
    869         elseif  ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] )
    870             $errors->add('newpass', __('Check your email for your new password.'), 'message');
    871         elseif  ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )
    872             $errors->add('registered', __('Registration complete. Please check your email.'), 'message');
    873         elseif ( strpos( $redirect_to, 'about.php?updated' ) )
    874             $errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.' ), 'message' );
    875     }

    This code snippet is executed in both the “login” and “default” branches of a switch statement earlier in the Main function.

    424 do_action( 'login_init' );
    425 /**
    426  * Fires before a specified login form action.
    427  *
    428  * The dynamic portion of the hook name, <code>$action</code>, refers to the action
    429  * that brought the visitor to the login form. Actions include 'postpass',
    430  * 'logout', 'lostpassword', etc.
    431  *
    432  * @since 2.8.0
    433  */
    434 do_action( 'login_form_' . $action );
    435
    436 $http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
    437 $interim_login = isset($_REQUEST['interim-login']);
    438
    439 switch ($action) {

    Thank you for looking into this!

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

The topic ‘“Login Expired” hook?’ is closed to new replies.