Login     Sign up
Need to change preg_match function
dipen patel (@dipen153)
Join date: Oct 15th 2011
Community posts: 10
View Profile
Send Message

i want only users with gmail accounts to sign up and rest of the email address should be unavailable

example:
[email protected]
can sign up but
[email protected] cannot
also @gmail.edu , @gmail.org cannot signup

thanks in advance

153 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

in jcow they still use eregi

[code]
if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$", $_POST['email'])) {
$errors[] = t('Unavailable email address');
}
elsif (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@gmail.com$", $_POST['email'])) {
$errors[] = t('only gmail-accounts allowed');
}
[/code]

153 months ago
dipen patel (@dipen153)
Join date: Oct 15th 2011
Community posts: 10
View Profile
Send Message

didn't work i already tried that..
still when i enter any email address it takes in n signs up..
m trying to replace it in member.module
do i need to replace it anywhere else?

153 months ago
dipen patel (@dipen153)
Join date: Oct 15th 2011
Community posts: 10
View Profile
Send Message

Thanks it worked..

153 months ago