]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use NICKNAME_FMT everywhere consistently
authorCraig Andrews <candrews@integralblue.com>
Wed, 5 Aug 2009 20:26:19 +0000 (16:26 -0400)
committerCraig Andrews <candrews@integralblue.com>
Wed, 5 Aug 2009 20:26:19 +0000 (16:26 -0400)
actions/finishopenidlogin.php
actions/profilesettings.php
actions/updateprofile.php
actions/userauthorization.php
plugins/FBConnect/FBConnectAuth.php

index ff0b35218f5ccb0ecd38208e6771f3cb7970f813..ba1e933e3e13156c3baa7eee56638e139c21b71e 100644 (file)
@@ -217,7 +217,7 @@ class FinishopenidloginAction extends Action
 
         if (!Validate::string($nickname, array('min_length' => 1,
                                                'max_length' => 64,
-                                               'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                               'format' => NICKNAME_FMT))) {
             $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
             return;
         }
@@ -389,7 +389,7 @@ class FinishopenidloginAction extends Action
     {
         if (!Validate::string($str, array('min_length' => 1,
                                           'max_length' => 64,
-                                          'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                          'format' => NICKNAME_FMT))) {
             return false;
         }
         if (!User::allowed_nickname($str)) {
index fb847680b9c158e85dc319d89029933edddabc2d..d8fb2c9bb1cdd2adc8a6344a0ba5f4788a28f3eb 100644 (file)
@@ -189,7 +189,7 @@ class ProfilesettingsAction extends AccountSettingsAction
             // Some validation
             if (!Validate::string($nickname, array('min_length' => 1,
                             'max_length' => 64,
-                            'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                            'format' => NICKNAME_FMT))) {
                 $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
                 return;
             } else if (!User::allowed_nickname($nickname)) {
index d8b62fb09051d59f55c5ad374b6937dec2f3b0c0..f6cb277aa7a6b98c1f11cbf6514b3dbe2b40a8fd 100644 (file)
@@ -79,7 +79,7 @@ class UpdateprofileAction extends Action
         $nickname = $req->get_parameter('omb_listenee_nickname');
         if ($nickname && !Validate::string($nickname, array('min_length' => 1,
                                                             'max_length' => 64,
-                                                            'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                                            'format' => NICKNAME_FMT))) {
             $this->clientError(_('Nickname must have only lowercase letters and numbers and no spaces.'));
             return false;
         }
index 8dc2c808d6ff849f0da742e342de137203eeacd4..00903ae01a07bce0363fd125d02d7eda753e33a4 100644 (file)
@@ -481,7 +481,7 @@ class UserauthorizationAction extends Action
         $nickname = $_GET['omb_listenee_nickname'];
         if (!Validate::string($nickname, array('min_length' => 1,
                                                'max_length' => 64,
-                                               'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                               'format' => NICKNAME_FMT))) {
             throw new OAuthException('Nickname must have only letters and numbers and no spaces.');
         }
         $profile = $_GET['omb_listenee_profile'];
index 3cf9fefc1380fa5bb958040bb2642334184a40a3..a3e2cdadcdd5baad904d9703babbbf75b690774c 100644 (file)
@@ -238,7 +238,7 @@ class FBConnectauthAction extends Action
 
         if (!Validate::string($nickname, array('min_length' => 1,
                                                'max_length' => 64,
-                                               'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                               'format' => NICKNAME_FMT))) {
             $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
             return;
         }
@@ -418,7 +418,7 @@ class FBConnectauthAction extends Action
     {
         if (!Validate::string($str, array('min_length' => 1,
                                           'max_length' => 64,
-                                          'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                          'format' => NICKNAME_FMT))) {
             return false;
         }
         if (!User::allowed_nickname($str)) {