]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseModule.php
Meaningful notification message
[friendica.git] / src / BaseModule.php
index b812370fdf0d5b35f335d0e47005f148b23620fb..d7ca5798deb61ae48bbc0eabd96a40689d7c6362 100644 (file)
@@ -136,7 +136,7 @@ abstract class BaseModule
         */
        public static function getFormSecurityToken($typename = '')
        {
-               $user = User::getById(DI::app()->getUserId(), ['guid', 'prvkey']);
+               $user = User::getById(DI::app()->getLoggedInUserId(), ['guid', 'prvkey']);
                $timestamp = time();
                $sec_hash = hash('whirlpool', ($user['guid'] ?? '') . ($user['prvkey'] ?? '') . session_id() . $timestamp . $typename);
 
@@ -163,7 +163,7 @@ abstract class BaseModule
 
                $max_livetime = 10800; // 3 hours
 
-               $user = User::getById(DI::app()->getUserId(), ['guid', 'prvkey']);
+               $user = User::getById(DI::app()->getLoggedInUserId(), ['guid', 'prvkey']);
 
                $x = explode('.', $hash);
                if (time() > (intval($x[0]) + $max_livetime)) {