Skip to content

Commit

Permalink
Do not udpate test users email or password
Browse files Browse the repository at this point in the history
  • Loading branch information
vedmant committed Mar 7, 2024
1 parent ae3759e commit a0b7d89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ public function update(Request $request, User $user)
'password' => 'nullable|min:6|confirmed',
]);

// Do not udpate test users email or password
if (in_array($user->email, ['[email protected]', '[email protected]'])) {
$request->offsetUnset('email');
$request->offsetUnset('password');
}

$user->fill($request->only('name', 'email'));
if ($request->get('password')) {
$user->password = bcrypt($request->get('password'));
Expand Down

0 comments on commit a0b7d89

Please sign in to comment.