• Resolved glashkoff

    (@glashkoff)


    Hi. I found the error. Please correct the registration logic.
    In \include\controller.php on line 303, an attempt is made to access the $user variable:
    do_action( 'clean_login_register', $user);
    But $user is created inside the if condition {}:

    else{
    $user_id = ( $cleanlogin_has_verified_nonce ) ? wp_create_user( $username, $pass1, $email ) : new WP_Error( 'invalid_nonce', __( 'Invalid NONCE, please try again.', 'clean-login' ) );
    if ( is_wp_error( $user_id ) )
    $url = esc_url( add_query_arg( 'created', 'failed', $url ) );
    else {
    $successful_registration = true;
    $user = new WP_User( $user_id );

    …some code…

    }
    do_action( 'clean_login_register', $user);

    Therefore, the $user variable at 303 line cannot be accessed.

Viewing 1 replies (of 1 total)
  • Plugin Author Javier Carazo

    (@carazo)

    Thanks for your message!!

    I have just initiated this var to 0 in order to make possible to handle out of if with the correct value (once the user has been initiated).

    You have it available in next version.

Viewing 1 replies (of 1 total)

The topic ‘Error at registration’ is closed to new replies.