X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSecurity%2FAuthentication.php;h=709267c79fbd981dc3895ec0144e0dc41b243fb7;hb=e56a53647bd5469551bf4f9ef2df50a5dd16b943;hp=e894c6ddaf776fbe3e925fc7d98b290c53b44f80;hpb=536fbe5af17a4a393ea440155e2770f63b5a71f5;p=friendica.git diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index e894c6ddaf..709267c79f 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -1,6 +1,6 @@ config = $config; $this->mode = $mode; @@ -246,7 +258,7 @@ class Authentication ['uid' => User::getIdFromPasswordAuthentication($username, $password)] ); } catch (Exception $e) { - $this->logger->warning('authenticate: failed login attempt', ['action' => 'login', 'username' => Strings::escapeTags($username), 'ip' => $_SERVER['REMOTE_ADDR']]); + $this->logger->warning('authenticate: failed login attempt', ['action' => 'login', 'username' => $username, 'ip' => $_SERVER['REMOTE_ADDR']]); notice($this->l10n->t('Login failed. Please check your credentials.')); $this->baseUrl->redirect(); } @@ -305,7 +317,6 @@ class Authentication $this->session->set('new_member', time() < ($member_since + (60 * 60 * 24 * 14))); if (strlen($user_record['timezone'])) { - date_default_timezone_set($user_record['timezone']); $a->setTimeZone($user_record['timezone']); } @@ -315,7 +326,7 @@ class Authentication $this->session->set('cid', $contact['id']); } - header('X-Account-Management-Status: active; name="' . $user_record['username'] . '"; id="' . $user_record['nickname'] . '"'); + $this->setXAccMgmtStatusHeader($user_record); if ($login_initial || $login_refresh) { $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]); @@ -358,7 +369,7 @@ class Authentication if ($login_initial) { Hook::callAll('logged_in', $user_record); - if (DI::module()->getName() !== 'home' && $this->session->exists('return_path')) { + if (DI::args()->getModuleName() !== 'home' && $this->session->exists('return_path')) { $this->baseUrl->redirect($this->session->get('return_path')); } }