From ae0275ec2ce65dd4ae89a6d5ba5822318e8e5f55 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 29 Jun 2011 19:26:18 -0700 Subject: [PATCH] collapse multiple spaces in usernames --- mod/register.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/register.php b/mod/register.php index 78dc75f7..7aaf7479 100644 --- a/mod/register.php +++ b/mod/register.php @@ -71,6 +71,8 @@ function register_post(&$a) { $err = ''; + // collapse multiple spaces in name + $username = preg_replace('/ +/',' ',$username); if(mb_strlen($username) > 48) $err .= t('Please use a shorter name.') . EOL; @@ -93,6 +95,7 @@ function register_post(&$a) { $err .= t("That doesn't appear to be your full \x28First Last\x29 name.") . EOL; } + if(! allowed_email($email)) $err .= t('Your email domain is not among those allowed on this site.') . EOL;