summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/finishopenidlogin.php8
-rw-r--r--actions/profilesettings.php2
-rw-r--r--actions/register.php2
3 files changed, 12 insertions, 0 deletions
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php
index 27e5057ec..fe9894e52 100644
--- a/actions/finishopenidlogin.php
+++ b/actions/finishopenidlogin.php
@@ -167,6 +167,11 @@ class FinishopenidloginAction extends Action {
$this->show_form(_t('Nickname must have only letters and numbers and no spaces.'));
return;
}
+
+ if (!User::allowed_nickname($nickname)) {
+ $this->show_form(_t('Nickname not allowed.'));
+ return;
+ }
if (User::staticGet('nickname', $nickname)) {
$this->show_form(_t('Nickname already in use. Try another one.'));
@@ -338,6 +343,9 @@ class FinishopenidloginAction extends Action {
'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
return false;
}
+ if (!User::allowed_nickname($str)) {
+ return false;
+ }
if (User::staticGet('nickname', $str)) {
return false;
}
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 6764ad288..b6e24c729 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -88,6 +88,8 @@ class ProfilesettingsAction extends SettingsAction {
'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
$this->show_form(_t('Nickname must have only letters and numbers and no spaces.'));
return;
+ } else if (!User::allowed_nickname($nickname)) {
+ $this->show_form(_t('Not a valid nickname.'));
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
!Validate::uri($homepage, array('allowed_schemes' => array('http', 'https')))) {
$this->show_form(_t('Homepage is not a valid URL.'));
diff --git a/actions/register.php b/actions/register.php
index 31c8fea70..16e80ef17 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -57,6 +57,8 @@ class RegisterAction extends Action {
$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 (!User::allowed_nickname($nickname)) {
+ $this->show_form(_t('Not a valid nickname.'));
} else if ($this->email_exists($email)) {
$this->show_form(_t('Email address already exists.'));
} else if ($password != $confirm) {