]> git.mxchange.org Git - friendica.git/commitdiff
On OStatus and Diaspora the usernames mustn't contain "-" - so we adopt this here.
authorMichael Vogel <icarus@dabo.de>
Sat, 8 Aug 2015 15:45:18 +0000 (17:45 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 8 Aug 2015 15:45:18 +0000 (17:45 +0200)
include/user.php

index 580af56f981ac21bf790021959c31b4b613fe148..33ff46ee643b3a25bd8ab5707fccf40bf6a11f90 100644 (file)
@@ -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)