WordPress.org

Ready to get started?Download WordPress

Forums

Simple Login Log
Plugin compatibility with Sidebar login (11 posts)

  1. bmasdoua
    Member
    Posted 2 years ago #

    Hello Max,

    First of all, thanks for your great work on wordpress plugins.
    Il hardly try to use Simple login log with the other plugin sidebar login but yours does not hook the login event to add it to the login table.
    I tried with the classic login form and it works fine.
    What's the action I have to add in order to get my lgoins coming from sidebar login added to the log table ?

    I'm not sure to be clear enough because my english is so poor.

    thanks

    ben

    http://wordpress.org/extend/plugins/simple-login-log/

  2. Max Chirkov
    Member
    Plugin Author

    Posted 2 years ago #

    Hi there,

    the native "login" function is wp_signon(). At the very end before it returns user object it has an action hook "wp_login". It's there for a reason. Authors who write plugins for additional login methods should utilize that action hook in the same manner.

    Write your plugin author and point him/her to this post and ask them to add that action hook - it's just 1 line.

  3. bmasdoua
    Member
    Posted 2 years ago #

    Hi Max,

    Thanx for your answer.

    I'll start by testing the adding of do_action in the good place and after send it to the plugins authors.

    greets.

  4. Max Chirkov
    Member
    Plugin Author

    Posted 2 years ago #

    Just make sure your action hook contains the same parameters:

    do_action('wp_login', $user->user_login, $user);

    $user->user_login should contain username (login name), and the $user is the user object. In third party plugins they might be represented with different variables.

  5. bmasdoua
    Member
    Posted 2 years ago #

    thank you,

    This is exactly what I did, but I can't get it working on a 3.3.1 version, with a 3.1.2 version it works fine (same versions of plugins in both wordpress)

    I also added a line do_action('wp_login_failed', $user->user_login, $user); in order to catch both situations but it doesn't work at this time.

    There is probably something I miss.

  6. Max Chirkov
    Member
    Plugin Author

    Posted 2 years ago #

    What's the name of the plugin you're using for logins?

  7. bmasdoua
    Member
    Posted 2 years ago #

  8. Max Chirkov
    Member
    Plugin Author

    Posted 2 years ago #

    I'm not sure what kind of problem you're running in... I just installed the plugin and tested it out - everything works just fine. I tried loggin in as an admin and as a subscriber - both got recorded in my log. I also entered a redirect URL just to make sure it doesn't fail under different conditions and in all cases my logins were tracked just fine.

    P.S. Make sure you're using the latest version of the Simple Login Log as well as the Sidebar Login.

  9. bmasdoua
    Member
    Posted 2 years ago #

    Hi Max,

    Thanks a lot for the time allowed to my issue. I have started a brand new pluginless wordpress environment in order to try it.
    Your plugin works perfect, I'll find this afternoon which plugin can conflict with yours and i'll tell you so.

    back to tests !

    regards

  10. bmasdoua
    Member
    Posted 2 years ago #

    Ok, It look like a conflict with my artisteer generated theme.
    When I disable it, your plugin works.

    How can a theme interact with the login procedure ?

  11. Max Chirkov
    Member
    Plugin Author

    Posted 2 years ago #

    Perform a search through Artisteer files for a "wp_login" string. The theme must be using the same hook to do something, or undo it at all.. if it does, it must be preventing other functions from executing at this hook. Post the code of the function that executes during that hook and I'll take a look.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic