mirror of
https://github.com/friendica/friendica
synced 2025-04-19 09:10:12 +00:00
"getUserId" is now "getLoggedInUserId"
This commit is contained in:
parent
15b93b4459
commit
c81e81dc8d
23 changed files with 31 additions and 31 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue