• Resolved moxita

    (@moxita)


    Simple History was working fine for us until May 7, with the following snippets in functions.php

    /**
     * Load only the loggers for changes of posts and pages (and SimpleLogger, that always must be loaded)
     */
    
    add_filter("simple_history/logger/load_logger", function($load_logger, $logger_basename) {
    
    		$load_logger = false;
    		$do_log_us = array("SimpleUserLogger", "SimpleLogger");
    
    		if ( in_array( $logger_basename, $do_log_us ) ) {
    			$load_logger = true;
    		}
    
    		return $load_logger;
    
    	}, 10, 2 );
    
    // Allow only the users specified in $allowed_users to show the history page, the history widget on the dashboard, or the history settings page
    add_filter("simple_history/show_dashboard_page", "function_show_history_dashboard_or_page");
    add_filter("simple_history/show_dashboard_widget", "function_show_history_dashboard_or_page");
    add_filter("simple_history/show_settings_page", "function_show_history_dashboard_or_page");
    function function_show_history_dashboard_or_page($show) {
    
    	/*
    	$allowed_users = array(
    		"[email protected]",
    		"[email protected]"
    	);
    */
    	if (!current_user_can('administrator') && !is_admin()) {
    		$show = false;
    	}
    
    	// if ( ! in_array( $user->user_email, $allowed_users ) ) {
    
    	$user = wp_get_current_user();
    	if (in_array("subscriber", $user->roles)) {
    		$show = false;
    	}
    
    	return $show;
    
    }
    // Don't let anyone - even with the correct secret - view the RSS feed
    add_filter("simple_history/rss_feed_show", "__return_false");
    // Skip loading of a dropin completely (in this case the RSS dropin)
    add_filter("simple_history/dropin/load_dropin_SimpleHistoryRSSDropin", "__return_false");

    But for some reason it’s now showing only login events from a single IP (another admin who is not me) and nobody else. How can we troubleshoot this? Thanks!

    https://www.ads-software.com/plugins/simple-history/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter moxita

    (@moxita)

    Actually, now that I look at it, it seems to not be recording login/logout events; it just so happens that only the other admin is creating other user events I think.

    Plugin Author P?r Thernstr?m

    (@eskapism)

    So if you logout and then in again, then that is not shown in the log?

    Thread Starter moxita

    (@moxita)

    No, but I figured out the problem. So sorry! I use Plugin Organizer and at some point, a setting got changed and Simple History was turned off on the front page. Thank you for responding.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Started showing only events for one IP’ is closed to new replies.