Support » Plugin: wp2syslog » Potential improvement in the code

  • Resolved Chris


    Hi! Thanks for writing this plugin – I am using it.
    I noticed that, in this function, on line 314 of wp2syslog_events.php


    function wp2syslog_user_register() {
    	global $wp2syslog_eventTriggered, $wp2syslogDoTrigger;
    	if ('true' === $wp2syslogDoTrigger['user_register']) {
    		$user = get_userdata(<strong>$arg</strong>);
    		wp2syslog('core', sprintf( __('New user successfully registered. Name: %1$s (%2$s).', 'wp2syslog'), $user->display_name, $user->user_login ), 3);
    		$wp2syslog_eventTriggered['user_register'] = true;

    that $arg is not set. You could put
    before $user = get_userdata($arg);

    Thanks again and keep up the good work 🙂

Viewing 1 replies (of 1 total)
  • Plugin Author psicosi448


    It was a typo in function declaration.
    I fixed it in 0.2.2:

    function wp2syslog_register_post($arg=’null’, $arg2=’null’) {



Viewing 1 replies (of 1 total)
  • The topic ‘Potential improvement in the code’ is closed to new replies.