]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Authentication.php
Remove code parameter from HTTPException constructor
[friendica.git] / src / Core / Authentication.php
index 235b99f8f78fd62b67882d54ac7f6bfa8bbf0eb6..1963d34b4ee89f57565218dc4fb490a8b870bbb2 100644 (file)
@@ -8,6 +8,7 @@ namespace Friendica\Core;
 use Friendica\BaseObject;
 use Friendica\Database\DBA;
 use Friendica\Model\User;
+use Friendica\Util\BaseURL;
 use Friendica\Util\DateTimeFormat;
 
 /**
@@ -21,6 +22,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)
        {
@@ -32,8 +34,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 = [])
        {
@@ -49,18 +52,19 @@ class Authentication extends BaseObject
                        $value = "";
                }
 
-               setcookie("Friendica", $value, $time, "/", "", (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL), true);
+               setcookie("Friendica", $value, $time, "/", "", (Config::get('system', 'ssl_policy') == BaseUrl::SSL_POLICY_FULL), true);
        }
 
        /**
         * @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)
        {