1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Got registration process working with social accounts

This commit is contained in:
Dan Brown
2015-09-06 12:14:32 +01:00
parent dec0cbb1b2
commit 411c331a62
9 changed files with 239 additions and 50 deletions

View File

@ -35,7 +35,7 @@ class EmailConfirmationService
*/
public function sendConfirmation(User $user)
{
if($user->email_confirmed) {
if ($user->email_confirmed) {
throw new ConfirmationEmailException('Email has already been confirmed, Try logging in.', '/login');
}
$this->deleteConfirmationsByUser($user);
@ -66,7 +66,7 @@ class EmailConfirmationService
}
// If more than a day old
if(Carbon::now()->subDay()->gt($emailConfirmation->created_at)) {
if (Carbon::now()->subDay()->gt($emailConfirmation->created_at)) {
$this->sendConfirmation($emailConfirmation->user);
throw new UserRegistrationException('The confirmation token has expired, A new confirmation email has been sent.', '/register/confirm');
}