• kwisatz

    (@kwisatz)


    On one of my sites, when I’m submitting the registration form, I get

    Congratulations! Your registration was successful.

    You may log in using the password that was emailed to you as soon as your account was activated

    but the user doesn’t show up on the user list in the admin settings.

    When trying to send notification to the admin, I’m also seeing this in the logs:

    PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/site/wp-content/plugins/wp-members/inc/email.php on line 282, referer: …

    line 282 is : $arr['act_link'] = get_bloginfo ( 'wpurl' ) . "/wp-admin/user-edit.php?user_id=".$user_id;

    which to me, looks like $user_id is actually a WP_Error object since creating the user failed and it’s still trying to use it as an id.

    https://www.ads-software.com/plugins/wp-members/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kwisatz

    (@kwisatz)

    Never mind the first issue, that was due to an error in one of my filters. However, I think, there ought to be a check in inc/email.php or even earlier to check if $user_id is a WP_Error object or an integer and act accordingly.

    Plugin Author Chad Butler

    (@cbutlerjr)

    Actually, I have been wanting to make better use of WP_Error in the process. The whole process has matured quite a bit since the original framework of the WP-Members registration process.

    I’ve been looking at it and been considering moving the return of $wpmem_themsg down to after the wp_insert_user() function. That would give it the ability to return any WP-Members error but also any WP_Error.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No user created when submitting registration form’ is closed to new replies.