Viewing 13 replies - 16 through 28 (of 28 total)
  • Plugin Author bnovotny

    (@bnovotny)

    then at the end of user-reg-aide-registrationForm before the end of the class add the following:

    /**
    * Bypasses new user approve register post action
    * @since 1.5.1.0
    * @updated 1.5.1.0
    * @Filters ‘registration_errors’ line 219 user-registration-aide.php (Priority: 1 – Params: 3)
    * @access public
    * @accepts WordPress Object $errors
    * @accepts string $username
    * @accepts string $email
    * @author Brian Novotny
    * @website https://creative-software-design-solutions.com
    */

    function handle_new_user_approve_errors( $user_login, $user_email, $errors ){
    $errors = $this->csds_userRegAide_checkFields( $errors, $user_login, $user_email );
    if( empty( $errors ) ){

    // create the user
    $user_pass = wp_generate_password( 12, false );
    $user_id = wp_create_user( $user_login, $user_pass, $user_email );
    if ( !$user_id ) {
    $errors->add( ‘registerfail’, sprintf( __( ‘ERROR: Couldn’t register you… please contact the webmaster !’ ), get_option( ‘admin_email’ ) ) );
    }
    }else{

    }
    }

    that worked for mine he should not have used register post, that is a bad idea. The only thing is when it shows an error for an empty field it shows it twice but when I make this into the next release I will fix that too.

    Thread Starter security_man

    (@security_man)

    excellent! looks like it worked a treat, thank you so much!

    Thread Starter security_man

    (@security_man)

    whoops, mighta spoke too soon. The registration works, or at least looks like it does, but the new user is not anywhere in the system that i can see. neither approved or denied or pending.

    Plugin Author bnovotny

    (@bnovotny)

    ok did you add the code at the right places? I checked it again and I get a user pending when I register a new user.

    Plugin Author bnovotny

    (@bnovotny)

    And check to make sure it is all formatted properly, this forum destroys formatting so the lines may have been separated due to that so check thaat too.

    Plugin Author bnovotny

    (@bnovotny)

    You know what, I just tried something for giggles and found out you can eliminate the register_post action altogether, if the user registers without any errors wordpress creates the user which is all he is doing with his create new user. So we skip that and that eliminates the double errors on the registration form as well.

    The only code you should need is this on user-registration-aide.php after the last action and before the last unset around line 210 and 233

    just insert this instead

    // new for new_user_approve
    if( class_exists( ‘pw_new_user_approve’ ) ){
    $pw_nua = pw_new_user_approve::instance();
    remove_action( ‘register_post’, array( &$pw_nua, ‘create_new_user’ ), 10, 3 );
    unset( $pw_nua );
    }

    But then it circumvents his email process so never mind until I add a fix for that too which I will do tomorrow morning. Time to get some rest unless you need more help tonight.

    Plugin Author bnovotny

    (@bnovotny)

    I just released an new version to include all the updates I gave you and modified it a bit and updated his new user registration so it uses the new WordPress registration and doesn’t send the plain text password over the email and instead uses the new WordPress reset password option and sends the link instead with a key.

    Plugin Author bnovotny

    (@bnovotny)

    well i take that back, i rolled back the changes and have to look at them again because they worked on test machine but not on my site so I will look into that when I get back. Have to go out for awhile.

    Plugin Author bnovotny

    (@bnovotny)

    I got the fix, stupid test machine got stuck again, anywho I changed something in the new user approve plugin to make it work and forgot about it then changed it back but it never changed on my test site so I thought it was good to go. I now have got it fixed and will release it shortly, sorry about that mate!

    Plugin Author bnovotny

    (@bnovotny)

    This update, 1.5.1.3 should work now

    Plugin Author bnovotny

    (@bnovotny)

    Checked it on another site and it works now, so you should be good to go, sorry about that.

    Thread Starter security_man

    (@security_man)

    dude! you are friggin amazing. The author of the other plugin owes you a beer.

    Plugin Author bnovotny

    (@bnovotny)

    lol thanxs

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘registration errors dont prevent registration’ is closed to new replies.