X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FAuthentication.php;h=106ba2a6021ccd542325b4c4bff87d6c477818ae;hb=061d959e7f1387432c38d580429ed9e612954ed6;hp=ca5ec3fd08b79fcf26b7261182d51aef88a29d4d;hpb=57695d48b41b5dba9a4ec1e97b531ff6590d8845;p=friendica.git diff --git a/src/Core/Authentication.php b/src/Core/Authentication.php index ca5ec3fd08..106ba2a602 100644 --- a/src/Core/Authentication.php +++ b/src/Core/Authentication.php @@ -6,11 +6,6 @@ namespace Friendica\Core; use Friendica\BaseObject; -use Friendica\Core\Addon; -use Friendica\Core\Config; -use Friendica\Core\L10n; -use Friendica\Core\Logger; -use Friendica\Core\PConfig; use Friendica\Database\DBA; use Friendica\Model\User; use Friendica\Util\DateTimeFormat; @@ -26,6 +21,7 @@ class Authentication extends BaseObject * @param array $user Record from "user" table * * @return string Hashed data + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function getCookieHashForUser($user) { @@ -37,8 +33,9 @@ class Authentication extends BaseObject /** * @brief Set the "Friendica" cookie * - * @param int $time + * @param int $time * @param array $user Record from "user" table + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function setCookie($time, $user = []) { @@ -60,12 +57,13 @@ class Authentication extends BaseObject /** * @brief Sets the provided user's authenticated session * - * @todo Should be moved to Friendica\Core\Session once it's created + * @todo Should be moved to Friendica\Core\Session once it's created * - * @param type $user_record - * @param type $login_initial - * @param type $interactive - * @param type $login_refresh + * @param array $user_record + * @param bool $login_initial + * @param bool $interactive + * @param bool $login_refresh + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function setAuthenticatedSessionForUser($user_record, $login_initial = false, $interactive = false, $login_refresh = false) { @@ -154,7 +152,7 @@ class Authentication extends BaseObject } if ($login_initial) { - Addon::callHooks('logged_in', $a->user); + Hook::callAll('logged_in', $a->user); if (($a->module !== 'home') && isset($_SESSION['return_path'])) { $a->internalRedirect($_SESSION['return_path']);