WordPress.org

Forums

Stream
[resolved] Possible to log user login? (15 posts)

  1. Blutarsky
    Member
    Posted 1 year ago #

    As the subject states could you add an option to log user's login?

    https://wordpress.org/plugins/stream/

  2. shadyvb
    Member
    Plugin Author

    Posted 1 year ago #

    Stream does track user logins. Have you had any problems with this specific feature ?

  3. Blutarsky
    Member
    Posted 1 year ago #

    Well i have logged in with an author's login and no event was tracked in the dashboard...maybe my settings are wrong?

  4. shadyvb
    Member
    Plugin Author

    Posted 1 year ago #

    You can check Stream settings so you make sure you have not excluded that specific rule, or the login action altogether.

    And just to make sure, no user login events are tracked at all ? or just author logins ?

    Also make sure you're running the latest version of Stream.

  5. Blutarsky
    Member
    Posted 1 year ago #

    Besides the plugin, I am using a custom technique to login users using the function wp_signon
    Could this be the problem?

  6. Blutarsky
    Member
    Posted 1 year ago #

    I am running latest versions and no exclusion is set

  7. shadyvb
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, this is probably the cause of your problem, however .. wp_signon does fire the wp_login action which we hook into, but you need to make sure that the final do_action('wp_login', ...) receives proper expected arguments.

  8. Blutarsky
    Member
    Posted 1 year ago #

    Ah yes logging in regularly it is logged correctly...
    Maybe when using code to login using wp_signon function will fail?

  9. Blutarsky
    Member
    Posted 1 year ago #

    I'm using the "password protected" plugin that will force users to login using a custom form and a custom password. I use this plugin to prevent access to the whole site from unwanted users.
    Once done, if the first custom password management login is successfull, the code will signon on users accordingly:

    /* begin my code */
            $creds = array();
            $creds['user_login'] = 'username';
            $creds['user_password'] = 'thepassword';
    	$creds['remember'] = true;
    	$user = wp_signon( $creds, false );
    	if ( is_wp_error($user) )
    		echo $user->get_error_message();
           // run it before the headers and cookies are sent
           add_action( 'after_setup_theme', 'custom_login' );
    /* end my code */

    Should I modify this somehow?

  10. Blutarsky
    Member
    Posted 1 year ago #

    I see that wp_login is deprecated and replaced by wp_signon ....
    What can we do?

    [Moderator Note: No bumping, thank you.]

  11. shadyvb
    Member
    Plugin Author

    Posted 1 year ago #

    Can you please check if Stream is tracking normal user login from wp-login.php ? eg: for administrators.
    We need to narrow down possible causes.

  12. Blutarsky
    Member
    Posted 1 year ago #

    Yes it does track correctly ordinary logins & logouts

  13. shadyvb
    Member
    Plugin Author

    Posted 1 year ago #

    I've just opened a new ticket at our GitHub repo ( https://github.com/x-team/wp-stream/issues/434 ) so we can investigate this further.

    Thanks for reporting this! We'll get back to you once the ticket has been looked into.

  14. Blutarsky
    Member
    Posted 1 year ago #

    Thank you :-)

  15. Blutarsky
    Member
    Posted 1 year ago #

    Fixed in version 1.4.5. Now working, Thanks :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Stream
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.