summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/profilesettings.php4
-rw-r--r--actions/register.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index e98c84935..44243f310 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -80,7 +80,7 @@ class ProfilesettingsAction extends SettingsAction {
# Some validation
- if (!is_null($email) && !Validate::email($email, true)) {
+ if ($email && !Validate::email($email, true)) {
$this->show_form(_t('Not a valid email address.'));
return;
} else if (!Validate::string($nickname, array('min_length' => 1,
@@ -211,4 +211,4 @@ class ProfilesettingsAction extends SettingsAction {
return $other->id != $user->id;
}
}
-} \ No newline at end of file
+}
diff --git a/actions/register.php b/actions/register.php
index 16e80ef17..95e684c1b 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -49,7 +49,7 @@ class RegisterAction extends Action {
if (!$this->boolean('license')) {
$this->show_form(_t('You can\'t register if you don\'t agree to the license.'));
- } else if (!Validate::email($email, true)) {
+ } else if ($email && !Validate::email($email, true)) {
$this->show_form(_t('Not a valid email address.'));
} else if (!Validate::string($nickname, array('min_length' => 1,
'max_length' => 64,