mirror of
https://github.com/flarum/framework.git
synced 2025-03-03 09:14:26 +08:00
Get signup working again
This commit is contained in:
parent
d14716fa4d
commit
d90a8142a1
src
@ -61,9 +61,12 @@ class EmailConfirmationMailer
|
|||||||
{
|
{
|
||||||
$token = $this->generateToken($user, $email);
|
$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 [
|
return [
|
||||||
'username' => $user->username,
|
'username' => $user->username,
|
||||||
'url' => route('flarum.forum.confirmEmail', ['token' => $token->id]),
|
'url' => Core::config('base_url').'/confirm/'.$token->id,
|
||||||
'forumTitle' => Core::config('forum_title')
|
'forumTitle' => Core::config('forum_title')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,9 @@ trait WritesRememberCookie
|
|||||||
// Set a long-living cookie (two weeks) with the remember token
|
// Set a long-living cookie (two weeks) with the remember token
|
||||||
return FigResponseCookies::set(
|
return FigResponseCookies::set(
|
||||||
$response,
|
$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
|
// Delete the cookie by setting it to an expiration date in the past
|
||||||
return FigResponseCookies::set(
|
return FigResponseCookies::set(
|
||||||
$response,
|
$response,
|
||||||
SetCookie::create('flarum_remember')->withMaxAge(-2628000)
|
SetCookie::create('flarum_remember')
|
||||||
|
->withMaxAge(-2628000)
|
||||||
|
->withPath('/')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user