Update HomeSettings controller, bail earlier when attempting to update email that already exists

This commit is contained in:
Daniel Supernault 2022-11-17 21:02:54 -07:00
parent d660e46b22
commit 399bf5f810
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -159,7 +159,7 @@ trait HomeSettings
public function emailUpdate(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
'email' => 'required|email|unique:users,email',
]);
$changes = false;
$email = $request->input('email');