• I have installed this plugin hoping it was the answer, but, although it does add the new columns for “Registered” and “Last Log In”, there is n data in them. Should I wait? I mean does this only apply to registrations and log ins, “after” the plugin is installed?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author JohnnyPea

    (@johnnypea)

    You should see the “Registered” date all the time. I made tiny fix to display “No login” if user has no log in from the time of plugin activation (the column was empty before).

    Do you use any other plugin modifying user screen columns?

    I have the same problem and no, I do not use any other plugins that modify user screen columns.

    I am only testing with my “Administrator” login. Nothing is being recorded for my login.

    Plugin Author JohnnyPea

    (@johnnypea)

    Hi, are you using the latest version of the plugin 0.3? What is your WP version?

    It is impossible for this plugin to work. The function cll_last_user_login() which saves the last login to the usermeta is never called from anywhere in the plugin.

    My guess is that the line
    add_action(‘wp_login’,’last_user_login’);
    needs to be changed to
    add_action(‘wp_login’,’cll_last_user_login’);

    This could be why some people have said it is not working for them.

    Also, since users can avoid the login screen for up to 2 weeks using the ‘Remember me’ option, that will not be reflected as the user logging in.

    Plugin Author JohnnyPea

    (@johnnypea)

    Thank you for noticing this. There is right function name in the ‘wp_login’ action hook now.

    But you are wrong with the second thing you mentioned because there is also ‘wp_login’ action hook in wp_signon() function http://codex.wordpress.org/Function_Reference/wp_signon which is responsible for “auto log in”.

    JohnnyPea,

    When a user sets the ‘Remember Me’ box, a cookie is stored on the users computer with expiration of 2 weeks. When they come back another day and the cookie is present, the wp_login hook is not triggered. Therefore the last user login is never updated.

    wp_signon() is only used when the user types in the name/password. That path is not taken when using a login cookie.

    Plugin Author JohnnyPea

    (@johnnypea)

    I am sorry. You are right!

    I haven’t found appropriate hook to add update for the user meta where login time is stored for the users using logging cookies. Any idea?

    I notice that some people simply hook the ‘init’. If you do that, the timestamp will be written to the database on every single page load. Depending on your site that may or may not be an issue. This is more like a ‘last visit’ timestamp rather than ‘last login’, but does not have the limitation of an admin thinking someone has not login in for a week or more, when that is not true.

    Since WordPress does not appear to use PHP ‘sessions’ there really is no other way than hooking the init. If WordPress used a PHP ‘session’ it would be possible to update the database only once per session.

    Plugin Author JohnnyPea

    (@johnnypea)

    Yes, I was also thinking about adding it to the auth_redirect hook in auth_redirect() function but as you said it would update the timestamp on every refresh.

    Thread Starter CarpetGuy

    (@carpetguy)

    Hey folks, I just updated the plugin and I still see no data, not even the registration date, what’s next?

    Plugin Author JohnnyPea

    (@johnnypea)

    Hey! I just installed version 0.5 on one of my client’s site and it displays everything. Don’t know where could be a problem. Have you tried on an another WP installation?

    Btw. There is also a “DRP WordPress User Management” plugin that covers simmilar functionality. Maybe they found a better solution for the “last login issue”.

    Johnny, could you ev. update the plugin and offer a setting which hook to use (login vs. visit)?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Check Last Login] Check last login plugin does not work’ is closed to new replies.