Forum Replies Created
-
Hello, please can someone kindly help out with this, i still dont know how to restrict some people from registering on my domain, i only want .edu emails to register on my website
there is a plugin you can used called modal login/logout. there are some plugins from wordpress that will give you the login/logout option.
Secondly, you can instal IF Menu plugin which lets you put conditions on any Menu, you will select Hide Register when User is logged in.
Try that, am sure it will help.
someone kindly help, this is not yet working please!
This is what i have on my email_exist case name of userpro/functions/ajax.php
/* Side validate input */
add_action(‘wp_ajax_nopriv_userpro_side_validate’, ‘userpro_side_validate’);
add_action(‘wp_ajax_userpro_side_validate’, ‘userpro_side_validate’);
function userpro_side_validate(){
global $userpro;if ( $_POST[‘action’] != ‘userpro_side_validate’)
die();extract($_POST);
$output[‘error’] = ”;
switch($ajaxcheck) {case ‘envato_purchase_code’:
if ( !$userpro->verify_purchase($input_value) ) {
$output[‘error’] = __(‘Invalid purchase code or Envato API is down.’,’userpro’);
} else {
$output[‘error’] = ”;
}
break;case ‘display_name_exists’:
if ($userpro->display_name_exists($input_value)) {
$output[‘error’] = __(‘The display name is already in use.’,’userpro’);
}
break;case ‘username_exists’:
if (username_exists($input_value)){
$output[‘error’] = __(‘Username already taken.’,’userpro’);
} else if ( !preg_match(“/^[A-Za-z0-9_]+$/”, $input_value) ) {
$output[‘error’] = __(‘Illegal characters are not allowed in username.’,’userpro’);
}
break;case ’email_exists’:
$getTld = explode(“.”, $user_email);
if (!is_email($input_value)) {
$output[‘error’] = __(‘Please enter a valid email.’,’userpro’);
} else if (email_exists($input_value)) {
$output[‘error’] = __(‘Email is taken. Is that you? Try to login‘,’userpro’);
}
if ($user_email->email_exists){
$getTld[1]!=’edu’;
$output [‘error’]= __( ‘ERROR: This email is not a .edu approved email, please choose another one.’,’userpro’ );}
break;
case ‘validatesecretkey’:
if (strlen($input_value) != 20) {
$output[‘error’] = __(‘The secret key you entered is invalid.’,’userpro’);
} else {
$users = get_users(array(
‘meta_key’ => ‘userpro_secret_key’,
‘meta_value’ => $input_value,
‘meta_compare’ => ‘=’,
));
if (!$users[0]) {
$output[‘error’] = __(‘The secret key is invalid or expired.’,’userpro’);
}
}
break;}
$output=json_encode($output);
if(is_array($output)){ print_r($output); }else{ echo $output; } die;
}Hello Support, i dont know the code to use, i dont know what to write there, am not a programmer, i just know that is where i could edit it, can you kindly provide some lines of tested and working code that i should use to replace the ’email_exist’ case name.
Please kindly do.