Get signup working again

This commit is contained in:
Toby Zerner 2015-06-19 11:43:36 +09:30
parent d14716fa4d
commit d90a8142a1
2 changed files with 10 additions and 3 deletions

View File

@ -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')
];
}

View File

@ -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('/')
);
}
}