• Resolved rgosse75

    (@rgosse75)


    Hello,

    I noticed that the plugin does not log my history as as administrator though it did before the last update.

    Is there a reason it is not logging the admin history anymore?

    • This topic was modified 7 years, 9 months ago by rgosse75.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter rgosse75

    (@rgosse75)

    I tested with a user that I registered and that login history will show but nothing for the admin shows anymore.

    Its not the end of the world but its nice to be able to have any type of role reflect in the login history.

    Did you remove admin login history capability?

    Plugin Author Faiyaz Alam

    (@faiyazalam)

    @rgosse75 I have tested the plugin in wordpress 4.8, it is working fine for admin as well as frontend user login.

    Please follow these two methods to debug this.

    Method-1)
    Deactivate the plugin, and then copy the following snippet in your theme functions.php file.

    add_action('wp_login', 'save_user_login');
     function save_user_login($user_login, $user) {
     echo "debug start";
     echo "<br>";
            global $wpdb;
            echo "<pre>";
    print_r($user_login);
    echo "<br>";
    print_r($user);
    echo "<br>";
    echo "debug end";
        }

    Now re-login as admin.

    Now activate the plugin and re-login as admin.

    Share the two outputs with us.

    Method-2
    The following function is responsible to save user login data from frontend as well as backend:
    wp-content\plugins\user-login-history\admin\class-user-login-history-user-tracker.php

    function is “save_user_login”

    You should debug this function.

    Thread Starter rgosse75

    (@rgosse75)

    Nothing changed when I added the php function.

    I am not sure how to debug but it could be a conflict with a plugin possibly?

    I had a few that recently updated.

    Sometimes it causes issues but most of the time it doesn’t.

    Not sure what the deal is???

    Thread Starter rgosse75

    (@rgosse75)

    Another thing I noticed was though I unselected the ‘old role’ from being displayed it still shows up as one of the columns when I look at the user history table.

    Not sure what is going on but there must be a bug some place causing interference.

    • This reply was modified 7 years, 9 months ago by rgosse75.
    Thread Starter rgosse75

    (@rgosse75)

    Not sure what the problem is but I will uninstall for now and try at a later time.

    Plugin Author Faiyaz Alam

    (@faiyazalam)

    @rgosse75 I suggest you to install a fresh wordpress setup on localhost and then install my plugin.
    Check whether it is working or not.
    If it is working then install your other plugins one by one, this way you can check which plugin is conflicting. Thanks.

    • This reply was modified 7 years, 9 months ago by Faiyaz Alam.
    Thread Starter rgosse75

    (@rgosse75)

    Ok, sounds good.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Admin Login History’ is closed to new replies.