aboutsummaryrefslogtreecommitdiffstats
path: root/mod/register.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-29 19:26:18 -0700
committerFriendika <info@friendika.com>2011-06-29 19:26:18 -0700
commitae0275ec2ce65dd4ae89a6d5ba5822318e8e5f55 (patch)
tree01c71d98be23de1ff332a7e36c8918ac1ea04bc2 /mod/register.php
parentad5b976978011e2bf16fea5537af5b211e8e65eb (diff)
downloadvolse-hubzilla-ae0275ec2ce65dd4ae89a6d5ba5822318e8e5f55.tar.gz
volse-hubzilla-ae0275ec2ce65dd4ae89a6d5ba5822318e8e5f55.tar.bz2
volse-hubzilla-ae0275ec2ce65dd4ae89a6d5ba5822318e8e5f55.zip
collapse multiple spaces in usernames
Diffstat (limited to 'mod/register.php')
-rw-r--r--mod/register.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/mod/register.php b/mod/register.php
index 78dc75f77..7aaf74792 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;