X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOpenID%2Ffinishopenidlogin.php;h=ff0b451d30e28e4e1b367e666df9894750d99b4a;hb=10df75f9a074f2987b3525cd70a129bd26972ebb;hp=516625e41ab691bb299d4745bba4696694995b82;hpb=797f296974e892ab0c6b46586fb5cfc857e0f2a0;p=quix0rs-gnu-social.git diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php index 516625e41a..ff0b451d30 100644 --- a/plugins/OpenID/finishopenidlogin.php +++ b/plugins/OpenID/finishopenidlogin.php @@ -1,7 +1,7 @@ . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } require_once INSTALLDIR.'/plugins/OpenID/openid.php'; @@ -217,7 +217,7 @@ class FinishopenidloginAction extends Action if (!Validate::string($nickname, array('min_length' => 1, 'max_length' => 64, - 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) { + 'format' => NICKNAME_FMT))) { $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.')); return; } @@ -265,7 +265,7 @@ class FinishopenidloginAction extends Action $fullname = ''; } - if (!empty($sreg['email']) && Validate::email($sreg['email'], true)) { + if (!empty($sreg['email']) && Validate::email($sreg['email'], common_config('email', 'check_domain'))) { $email = $sreg['email']; } else { $email = ''; @@ -389,7 +389,7 @@ class FinishopenidloginAction extends Action { if (!Validate::string($str, array('min_length' => 1, 'max_length' => 64, - 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) { + 'format' => NICKNAME_FMT))) { return false; } if (!User::allowed_nickname($str)) { @@ -410,7 +410,7 @@ class FinishopenidloginAction extends Action } } - # We try to use an OpenID URL as a legal Laconica user name in this order + # We try to use an OpenID URL as a legal StatusNet user name in this order # 1. Plain hostname, like http://evanp.myopenid.com/ # 2. One element in path, like http://profile.typekey.com/EvanProdromou/ # or http://getopenid.com/evanprodromou