Mike VanWinkle's Simplr User Registration Form Plus Plugin
-
I hope someone out there can provide some advice.
I was following the “Create a Client Area in WordPress” post at StylizedWeb.com (link.The goal was to have clients access a registration form from a widget in the sidebar, submit their info, get an email asking them to verify their email address, while I get a notification that someone has just signed up and I need to approve them, and once I login and approve them as a “client”, they receive an email letting them know they are approved with a temporary password.
Plugins used: Sidebar Login –> Simplr User Registration Form Plus –> New User Approve –> and Register Plus Redux, which I deactivated because it seemed useless.
It’s working fine except admin isn’t receiving notification emails and user is being sent a temporary password BEFORE approval.I don’t know php, but I suspect that the FIX is too simple to hire someone to alter it. I think this is the problem code. Any suggestions?
//notify admin of new user $userdata = get_userdata( $user_id ); $data = array_merge( (array) $userdata->data , $data ); simplr_send_notifications($atts,$data,$passw); $extra = "Please check your email for confirmation."; $extra = apply_filters('simplr_extra_message', __($extra,'simplr-reg') ); $confirm = '<div class="simplr-message success">Your Registration was successful. '.$extra .'</div>'; //Use this hook for multistage registrations do_action('simplr_reg_next_action', array($data, $user_id, $confirm)); //return confirmation message. return apply_filters('simplr_reg_confirmation', $confirm); } function simplr_send_notifications($atts, $data, $passw) { global $simplr_options; $site = get_option('siteurl'); $name = get_option('blogname'); $user_name = @$data['username']; $email = @$data['email']; $notify = @$atts['notify']; $emessage = @$atts['message']; $headers = "From: $name" . ' <' .get_option('admin_email') .'> ' ."\r\n\\"; wp_mail($notify, "A new user registered for $name", "A new user has registered for $name.\rUsername: $user_name\r Email: $email \r",$headers); $emessage = $emessage . "\r\r---\r"; if(!isset($data['password'])) { $emessage .= "You should login and change your password as soon as possible.\r\r"; } $emessage .= "Username: $user_name\r"; $emessage .= (isset($data['fbuser_id']))?'Registered with Facebook':"Password: $passw\rLogin: $site"; if( @$simplr_options->mod_on == 'yes' AND @$simplr_options->mod_activation == 'auto') { $data['blogname'] = get_site_option('blogname'); $data['link'] = get_home_url( $blog_id, '/?activation_key='.$data['activation_key'] ); $content = simplr_token_replace( $simplr_options->mod_email, $data ); $subject = simplr_token_replace( $simplr_options->mod_email_subj, $data ); $headers = "From: ".get_option('admin_email')." \n"; wp_mail( $data['user_email'], $subject, $content, $headers); } else { $emessage = simplr_token_replace( $emessage, $data ); wp_mail($data['email'],"$name - Registration Confirmation", apply_filters('simplr_email_confirmation_message',$emessage), $headers); } }
- The topic ‘Mike VanWinkle's Simplr User Registration Form Plus Plugin’ is closed to new replies.