X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModule.php;h=d7ca5798deb61ae48bbc0eabd96a40689d7c6362;hb=6899d3c6185460bc917245eaedce8895f5b8d80e;hp=b812370fdf0d5b35f335d0e47005f148b23620fb;hpb=15b93b4459f051c1cf6d394a597399f17f9748f3;p=friendica.git diff --git a/src/BaseModule.php b/src/BaseModule.php index b812370fdf..d7ca5798de 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -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)) {