diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-09-23 15:36:21 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-09-23 15:36:21 -0700 |
commit | 4c2fbc81a043eabb984bf2da56081102dda64b70 (patch) | |
tree | eddbd7dac0ec9c2aacc502a995595d91e381317b /mod/register.php | |
parent | aedae07af63ff72b288b165e3263275285dc3c71 (diff) | |
download | volse-hubzilla-4c2fbc81a043eabb984bf2da56081102dda64b70.tar.gz volse-hubzilla-4c2fbc81a043eabb984bf2da56081102dda64b70.tar.bz2 volse-hubzilla-4c2fbc81a043eabb984bf2da56081102dda64b70.zip |
for corp and edu sites, allow registration only to certain email addrs
Diffstat (limited to 'mod/register.php')
-rw-r--r-- | mod/register.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/register.php b/mod/register.php index e65ba7c9b..b15ca4fb2 100644 --- a/mod/register.php +++ b/mod/register.php @@ -65,6 +65,12 @@ function register_post(&$a) { dbesc($email) ); + if(!eregi('[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z]{2,6}',$email)) + $err .= t(' Not valid email.'); + + if(! allowed_email($email)) + $err .= t(' Your email domain is not among those allowed on this site.'); + if($r !== false && count($r)) $err .= t(' Your email address is already registered on this system.') ; |