forked from GNUsocial/gnu-social
don't validate email if none provided
darcs-hash:20080624014642-34904-7d4b1b91a3163add6a99146f92360913e172a39a.gz
This commit is contained in:
parent
c2c7bf8272
commit
960a092a9c
@ -80,7 +80,7 @@ class ProfilesettingsAction extends SettingsAction {
|
|||||||
|
|
||||||
# Some validation
|
# 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.'));
|
$this->show_form(_t('Not a valid email address.'));
|
||||||
return;
|
return;
|
||||||
} else if (!Validate::string($nickname, array('min_length' => 1,
|
} else if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
|
@ -49,7 +49,7 @@ class RegisterAction extends Action {
|
|||||||
|
|
||||||
if (!$this->boolean('license')) {
|
if (!$this->boolean('license')) {
|
||||||
$this->show_form(_t('You can\'t register if you don\'t agree to the 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.'));
|
$this->show_form(_t('Not a valid email address.'));
|
||||||
} else if (!Validate::string($nickname, array('min_length' => 1,
|
} else if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
|
Loading…
Reference in New Issue
Block a user