We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d96b432 commit 53df46aCopy full SHA for 53df46a
1 file changed
app/app/Http/Controllers/ChangePasswordController.php
@@ -44,6 +44,8 @@ public function post(Request $request)
44
}
45
if ($failing) {
46
return Redirect::to('/user/change-password')->withErrors($validator)->withInput();
47
+ } elseif ($request->input('current_password')==$request->input('new_password')) {
48
+ return Redirect::back()->withErrors(['New password must be different than old']);
49
} else {
50
$user->password_hash = User::generateSaltedHash($request->input('new_password'));
51
$user->save();
0 commit comments