Hi, Jason,
I just installed and tested this New User Approve plugin a few hours ago. I’m also using the BuddyPress plugin. For me, the New User Approve plugin sends an email, informing the admin to authorize, but the new registrant also gets a valid activation link without the admin authorizing first. But, as the new user, even after following the link to authorize the new registration, when trying to log in as the new user, the login fails to authenticate.
So, I peeked around in the new-user-approve.php file, and the only place I could find where the code fragment you supplied could go starts at line 450. After hacking in your code fragment, the finished function looks like this.
public function create_new_user( $user_login, $user_email, $errors ) {
if ( $errors->get_error_code() ) {
return;
}
// begin ckt .............
// create the user. HACKED FOR BUDDYPRESS
// $user_pass = wp_generate_password( 12, false );
// reset password to know what to send the user
$data = array(
//'user_pass' => md5($new_pass),
'user_activation_key' => '',
);
// ........... end ckt
$user_id = wp_create_user( $user_login, $user_pass, $user_email );
if ( !$user_id ) {
$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
}
}
It’s too complicated to fully explain herein what the results were, different, of course, but after testing, it didn’t solve the problem. After testing failed to bring any joy, and upon further scrutinization of the new code in context, I am puzzled as to how it works/what it does, as I don’t see how the code fragment you have suggested makes us of the array “$data”. And, of course, commenting out the function call “wp_generate_password” does exactly that; no password is generated, (and no email is sent to the new registrant).
Not sure if this type of conversation is allowed in this forum. If it’s not, someone please inform me, and I will not do so again.