(Fix) User Password Reset

This commit is contained in:
HDVinnie
2018-06-09 08:51:21 -04:00
parent fc55658b1f
commit 8dafdf820b
2 changed files with 7 additions and 25 deletions

View File

@@ -239,10 +239,9 @@ class UserController extends Controller
'new_password_confirmation' => 'required|min:6',
]);
if ($v->passes()) {
if (Hash::check($request->current_password, $user->password)) {
$user->fill([
'password' => Hash::make($request->new_password)
])->save();
if (Hash::check($request->input('current_password'), $user->password)) {
$user->password = Hash::make($request->input('new_password'));
$user->save();
// Activity Log
\LogActivity::addToLog("Member {$user->username} has changed there account password.");