refactor: use Validation::getValidated() when using $this->validate() in controllers

This commit is contained in:
Yassine Doghri 2023-08-29 15:42:52 +00:00
commit 2c07070b2c
18 changed files with 129 additions and 70 deletions

View file

@ -53,10 +53,12 @@ class MagicLinkController extends ShieldMagicLinkController
->with('errors', $userModel->errors());
}
$validData = $this->validator->getValidated();
// set new password to user
auth()
->user()
->password = $this->request->getPost('new_password');
->password = $validData['new_password'];
if (! $userModel->update(auth()->user()->id, auth()->user())) {
return redirect()