mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Get signup working again
This commit is contained in:
parent
d14716fa4d
commit
d90a8142a1
|
@ -61,9 +61,12 @@ class EmailConfirmationMailer
|
|||
{
|
||||
$token = $this->generateToken($user, $email);
|
||||
|
||||
// TODO: Need to use UrlGenerator, but since this is part of core we
|
||||
// don't know that the forum routes will be loaded. Should the confirm
|
||||
// email route be part of core??
|
||||
return [
|
||||
'username' => $user->username,
|
||||
'url' => route('flarum.forum.confirmEmail', ['token' => $token->id]),
|
||||
'url' => Core::config('base_url').'/confirm/'.$token->id,
|
||||
'forumTitle' => Core::config('forum_title')
|
||||
];
|
||||
}
|
||||
|
|
|
@ -11,7 +11,9 @@ trait WritesRememberCookie
|
|||
// Set a long-living cookie (two weeks) with the remember token
|
||||
return FigResponseCookies::set(
|
||||
$response,
|
||||
SetCookie::create('flarum_remember', $token)->withMaxAge(14 * 24 * 60 * 60)
|
||||
SetCookie::create('flarum_remember', $token)
|
||||
->withMaxAge(14 * 24 * 60 * 60)
|
||||
->withPath('/')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -20,7 +22,9 @@ trait WritesRememberCookie
|
|||
// Delete the cookie by setting it to an expiration date in the past
|
||||
return FigResponseCookies::set(
|
||||
$response,
|
||||
SetCookie::create('flarum_remember')->withMaxAge(-2628000)
|
||||
SetCookie::create('flarum_remember')
|
||||
->withMaxAge(-2628000)
|
||||
->withPath('/')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user