Hi, How can I restrict registration to user with emails only from my company (for example [email protected])?
Hello ! Do you want to use only your company's email id for register or restrict it? It required code customization in library/control/user_auth.php Thanks & Regards Pramod
Thanks for your reply, what I meant is I want to restrict registering to user with emails that have extension @mycompany.com (which means forcing people to use their work email and also not letting anyone from outside to register)
Hello ! Code: var emailReg2 =/^([\w-\.]+@(?![EMAIL='[email protected]']mycompany.co.uk[/EMAIL])([\w-]+\.)+[\w-]{2,4})?$/ if (jQuery("#email").val() == "") { user_email.addClass("error"); user_email_error.text("Please provide your email address"); user_email_error.addClass("error"); return false; } else if (!emailReg.test(jQuery("#email").val())) { user_email.addClass("error"); user_email_error.text("Please provide valid email address"); user_email_error.addClass("error"); return false; } else if (!emailReg2.test(jQuery("#email").val())) { user_email.addClass("error"); user_email_error.text("This is not a valid email address"); user_email_error.addClass("error"); return false; } else { user_email.removeClass("error"); user_email_error.text(""); user_email_error.removeClass("error"); return true; } Please follow below image to use given code. Thanks & Regards Pramod Patel