Registration emails


#1

How to prevent users from registering on clipbucket with certain domain?
I like to prevent registration with emails containing mail.ru
how to do that?


#2

Hello buddy!

Here is how you can disable signups from .ru mail hosts and display an error message instead.

            $email = $_POST['email'];
	$mailHost = substr($email, -2);
	if ($mailHost == 'ru') {
		e("Signups from this email host are not allowed");
	}
  • Go to cb_root / signup.php
  • On line #42 after $form_data = $_POST; paste above code
  • Voilla! You’ve done it

Update : How to make it work with multiple domains

$banned_mails = array('ru','au','in','pk','br');
$email = $_POST['email'];
$mailHost = substr($email, -2);
if ($mailHost == 'ru' || in_array($mailHost, $banned_mails)) {
	e("Signups from this email host are not allowed");
}

Saqib Razzaq
ClipBucket Head


#3

what is simplest way to make this work for multiple domains?
can the domains be comma separated after the == or do we need distinct blocks like this one?
,ru is big one but .win iis another I am seeing lot of crap from
iirc I filed a post while back asking for ability to create email domain blacklist would really like to see that happen


#4

Thank you. I will do it.
Is it possible to put this in future in admin page where people can put domains for baning it from registering??
Can someone make a plugin for that?


#5

Just updated code to make it work with multiple domains.


#6

thank you.
Can I add in that line ‘yahoo.com’ too??

But still some plugin to do that in admin area will be appreciated!


#7
Please select your category
recap_verify_failed

Please help me this text is displayed when a user wants to register