From 2356d6a9aed4dda8995114a218eb4035ad9f05ae Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 8 Aug 2015 17:45:18 +0200 Subject: [PATCH] On OStatus and Diaspora the usernames mustn't contain "-" - so we adopt this here. --- include/user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/user.php b/include/user.php index 580af56f98..33ff46ee64 100644 --- a/include/user.php +++ b/include/user.php @@ -136,8 +136,8 @@ function create_user($arr) { $nickname = $arr['nickname'] = strtolower($nickname); - if(! preg_match("/^[a-z][a-z0-9\-\_]*$/",$nickname)) - $result['message'] .= t('Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.') . EOL; + if(! preg_match("/^[a-z0-9][a-z0-9\_]*$/",$nickname)) + $result['message'] .= t('Your "nickname" can only contain "a-z", "0-9" and "_".') . EOL; $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", dbesc($nickname)