]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't validate email if none provided
authorEvan Prodromou <evan@controlezvous.ca>
Tue, 24 Jun 2008 01:46:42 +0000 (21:46 -0400)
committerEvan Prodromou <evan@controlezvous.ca>
Tue, 24 Jun 2008 01:46:42 +0000 (21:46 -0400)
darcs-hash:20080624014642-34904-7d4b1b91a3163add6a99146f92360913e172a39a.gz

actions/profilesettings.php
actions/register.php

index e98c84935116ea2709d20fb719fc9f7cbea8d5ce..44243f310d95adcd8318b910c81f0d5b28643332 100644 (file)
@@ -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
+}
index 16e80ef1714a84cf5bf1a3eab198ecafa63831e2..95e684c1b57260ce33957af9210ae4da8c74931e 100644 (file)
@@ -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,