X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLogin.php;h=06d724bb2adc5eac1b48871ecd515c3fef665e99;hb=67dc08d120828fe277584ba4127340eeb447f8d4;hp=7d6470620acfda4f5b419b8b5b17452a23f8894b;hpb=69300291f03fe85502df9907014f0ad68ee07c9c;p=friendica.git diff --git a/src/Module/Login.php b/src/Module/Login.php index 7d6470620a..06d724bb2a 100644 --- a/src/Module/Login.php +++ b/src/Module/Login.php @@ -43,7 +43,7 @@ class Login extends BaseModule goaway(self::getApp()->get_baseurl()); } - return self::form(self::getApp()->get_baseurl(), $a->config['register_policy'] != REGISTER_CLOSED); + return self::form(self::getApp()->get_baseurl(), intval(Config::get('config', 'register_policy')) !== REGISTER_CLOSED); } public static function post() @@ -248,7 +248,7 @@ class Login extends BaseModule // Make sure to refresh the last login time for the user if the user // stays logged in for a long time, e.g. with "Remember Me" $login_refresh = false; - if (!x($_SESSION['last_login_date'])) { + if (empty($_SESSION['last_login_date'])) { $_SESSION['last_login_date'] = DateTimeFormat::utcNow(); } if (strcmp(DateTimeFormat::utc('now - 12 hours'), $_SESSION['last_login_date']) > 0) { @@ -266,7 +266,7 @@ class Login extends BaseModule * @param string $return_url The url relative to the base the user should be sent * back to after login completes * @param bool $register If $register == true provide a registration link. - * This will most always depend on the value of $a->config['register_policy']. + * This will most always depend on the value of config.register_policy. * @param array $hiddens optional * * @return string Returns the complete html for inserting into the page