Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to get time since last login for logged in user


  • admin25
    Participant

    @admin25

    Hi, I have been trying to figure out or find a code snippet that will get;
    The time since last login for logged in user.
    but not having any luck, I am hoping some here knows how to do this.
    Thanks

Viewing 1 replies (of 1 total)

  • admin25
    Participant

    @admin25

    This gets the last date a user logged in and avatar and some extra what-not

    `
    <?php
    global $current_user;

    get_currentuserinfo();
    echo get_avatar( $current_user->ID, 50 );
    ?>

    <?php
    global $userdata;
    global $current_user;
    get_currentuserinfo();
    $author = $current_user->display_name;
    if ( is_user_logged_in() ) {

    echo
    “Hello ” . $author . ““;

    _e(‘, you were last here on: ‘,’appthemes’);
    appthemes_get_last_login($userdata->ID);

    echo
    “. We need you! We want you! Welcome Back!!“;
    }
    ?>

    #nnn {
    color: #1E0D51;
    padding-left: 60px;
    padding-top: 10px;
    width: 800px;

    }

    `

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] How to get time since last login for logged in user’ is closed to new replies.
Skip to toolbar