WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [BUG] Ignores whether there are errors when regisering

[Resolved] [BUG] Ignores whether there are errors when regisering

  • When a user is registering if they do not enter a valid email, username etc. and when there is a redirect_to value set in the url.
    The registration page does not show the errors and the user is redirected to the page in the redirect_to alue.
    This is because this code is wrong in CMInvitationCodesActivation.php:

    if (!empty($_POST['redirect_to'])) {
                // if a redirect_to is set, honor it
                wp_safe_redirect($_POST['redirect_to']);
                exit();
            }
    
            // if there is an error already, let it do it's thing
            if ($errors->get_error_code())
                return $errors;

    it should be:

    // if there is an error already, let it do it's thing
            if ($errors->get_error_code())
                return $errors;
    
            if (!empty($_POST['redirect_to'])) {
                // if a redirect_to is set, honor it
                wp_safe_redirect($_POST['redirect_to']);
                exit();
            }

    Also – great plugin once I fixed this!

    http://wordpress.org/extend/plugins/cm-invitation-codes/

  • The topic ‘[Resolved] [BUG] Ignores whether there are errors when regisering’ is closed to new replies.