make new account automatically request e-mail confirmation

pull/26/head
Ondřej Hruška 6 years ago
parent 0a46f48e6a
commit 8988df93fd
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      app/Http/Controllers/Auth/ConfirmEmailController.php
  2. 12
      app/Http/Controllers/Auth/RegisterController.php

@ -51,9 +51,9 @@ class ConfirmEmailController extends Controller
if ($wasConfirmed) {
// user just changed an e-mail
flash()->success("Your new e-mail $ec->email was confirmed!")->important();
flash()->success("Your new e-mail $ec->email was confirmed!");
} else {
flash()->success("Your e-mail $ec->email was confirmed, your account is now active!")->important();
flash()->success("Your e-mail $ec->email was confirmed, your account is now active!");
}
return redirect(route('profile.view', $u->name));

@ -87,4 +87,16 @@ class RegisterController extends Controller
'password' => Hash::make($data['password']),
]);
}
/**
* The user has been registered.
*
* @param \Illuminate\Http\Request $request
* @param User $user
* @return mixed
*/
protected function registered(Request $request, $user)
{
$user->sendEmailConfirmationLink($user->email);
}
}

Loading…
Cancel
Save