• Resolved tyskkvinna

    (@tyskkvinna)


    I’m super happy with BadgeOS so far for how I can use it to do badges and physical-access based on the badges but we’re running into a critical problem.

    I have a fairly high-traffic website and badgeos is automatically logging every time a person logs into the site. We aren’t going to use logins for ANY achievement of any kind so I would like to disable this feature completely. Yesterday I deleted 100,000+ entries from wp_posts because I didn’t realise it was doing that. I don’t want to have to go into it every day and nuke all of the logins.

    I don’t mind doing some dirty work to get there but we had to disable this plugin while we figure it out because this combined with caching was causing a rather catastrophic impact.

    https://www.ads-software.com/plugins/badgeos/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    You should be able to remove the wp_login trigger completely with the following code, that you can put in your functions.php file.

    function prefix_remove_login_trigger( $triggers ) {
    	if ( isset( $triggers['wp_login'] ) {
    		unset( $triggers['wp_login'] );
    	}
    	return $triggers;
    }
    add_filter( 'badgeos_activity_triggers', 'prefix_remove_login_trigger' );

    You can see more information on the other default triggers in the /includes/triggers.php file.

    Thread Starter tyskkvinna

    (@tyskkvinna)

    Thank you!!

    Nice code snippet for future reference.
    I’ve asked this before due to the bloat the logging seems to have.
    Why does BadgeOS log a new post type into wp_posts anyway? Seems very database unfriendly and no other plugin that I’ve seen records in this manner and they still are able to provide useful stats etc

    Thread Starter tyskkvinna

    (@tyskkvinna)

    We implemented this and it completely locked out my WP install (index, dashboard, etc) — so we’re going to have to dig into it and see where the conflict was.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yes, please let me know if you figure out why this locked you out. If it’s something related specifically to the part I did, I’d love to make sure I don’t repeat.

    I created badges for login’s.

    After reading this thread, I’m not sure if I have to continue to use it when wp_posts is updated.

    Does all the logs gets stored in wp_posts?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    the current version has the logs as a post type, so they would get stored in that table, yes.

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