WordPress.org

Ready to get started?Download WordPress

Forums

wp2syslog
[resolved] Potential improvement in the code (2 posts)

  1. Chris
    Member
    Posted 1 year ago #

    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 :)

    http://wordpress.org/extend/plugins/wp2syslog/

  2. psicosi448
    Member
    Plugin Author

    Posted 1 year ago #

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

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

    Thanks.

    F.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic