]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/profilesettings.php
type -> address_type
[quix0rs-gnu-social.git] / actions / profilesettings.php
index b6e24c729976cdc638915023bf728e72a21853a5..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,
@@ -90,6 +90,7 @@ class ProfilesettingsAction extends SettingsAction {
                        return;
                } else if (!User::allowed_nickname($nickname)) {
                        $this->show_form(_t('Not a valid nickname.'));
+                       return;
                } 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.'));
@@ -210,4 +211,4 @@ class ProfilesettingsAction extends SettingsAction {
                        return $other->id != $user->id;
                }
        }
-}
\ No newline at end of file
+}