]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
canonicalization lowercases nicknames
authorEvan Prodromou <evan@prodromou.name>
Wed, 11 Jun 2008 14:18:24 +0000 (10:18 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 11 Jun 2008 14:18:24 +0000 (10:18 -0400)
darcs-hash:20080611141824-84dde-a1016e113f7ba0e32685d935cd57618c60db2265.gz

actions/register.php
lib/util.php

index d2e54b634596e8ecf3f5077910fafbba65c32d60..d41eb9490eb6c79361649c6e5297661d245cf477 100644 (file)
@@ -54,7 +54,7 @@ class RegisterAction extends Action {
                } else if (!Validate::string($nickname, array('min_length' => 1,
                                                                                                          'max_length' => 64,
                                                                                                          'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
-                       $this->show_form(_t('Nickname must have only letters and numbers and no spaces.'));
+                       $this->show_form(_t('Nickname must have only lowercase letters and numbers and no spaces.'));
                } else if ($this->nickname_exists($nickname)) {
                        $this->show_form(_t('Nickname already exists.'));
                } else if ($this->email_exists($email)) {
index 614e9f070c58c62d4b88319deb49ed2a8c6bab39..900149fc22bfd10cf37b457152aacb1f503718c4 100644 (file)
@@ -385,7 +385,7 @@ function common_current_user() {
 # get canonical version of nickname for comparison
 function common_canonical_nickname($nickname) {
        # XXX: UTF-8 canonicalization (like combining chars)
-       return $nickname;
+       return strtolower($nickname);
 }
 
 # get canonical version of email for comparison