]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Authentication.php
We should execute the worker job for normal situations ;-)
[friendica.git] / src / Core / Authentication.php
index ca5ec3fd08b79fcf26b7261182d51aef88a29d4d..106ba2a6021ccd542325b4c4bff87d6c477818ae 100644 (file)
@@ -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']);