1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Fix some incorrect attribute names

This commit is contained in:
Toby Zerner
2018-07-21 17:19:15 +09:30
parent 4f259425b0
commit 7d0813bce4
7 changed files with 10 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ class CollectGarbage implements Middleware
$time = Carbon::now()->timestamp;
AccessToken::whereRaw('last_activity <= ? - lifetime', [$time])->delete();
AccessToken::whereRaw('last_activity_at <= ? - lifetime_seconds', [$time])->delete();
$earliestToKeep = date('Y-m-d H:i:s', $time - 24 * 60 * 60);

View File

@@ -33,12 +33,12 @@ class Rememberer
public function remember(ResponseInterface $response, AccessToken $token)
{
$token->lifetime = 5 * 365 * 24 * 60 * 60; // 5 years
$token->lifetime_seconds = 5 * 365 * 24 * 60 * 60; // 5 years
$token->save();
return FigResponseCookies::set(
$response,
$this->cookie->make(self::COOKIE_NAME, $token->id, $token->lifetime)
$this->cookie->make(self::COOKIE_NAME, $token->token, $token->lifetime_seconds)
);
}