Potential improvement in the code
-
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
$arg=get_current_user_id();
before $user = get_userdata($arg);Thanks again and keep up the good work ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Potential improvement in the code’ is closed to new replies.