Add password change email notification
This commit is contained in:
parent
5e471d55cd
commit
de1cca4feb
3 changed files with 10 additions and 4 deletions
|
@ -12,7 +12,9 @@ use App\Util\Lexer\PrettyNumber;
|
|||
use Auth;
|
||||
use Cache;
|
||||
use DB;
|
||||
use Mail;
|
||||
use Purify;
|
||||
use App\Mail\PasswordChange;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
trait HomeSettings
|
||||
|
@ -127,6 +129,7 @@ trait HomeSettings
|
|||
$log->user_agent = $request->userAgent();
|
||||
$log->save();
|
||||
|
||||
Mail::to($request->user())->send(new PasswordChange($user));
|
||||
return redirect('/settings/home')->with('status', 'Password successfully updated!');
|
||||
} else {
|
||||
return redirect()->back()->with('error', 'There was an error with your request! Please try again.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue