| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function changePassword(ProfileChangePasswordRequest $request) |
||
| 27 | { |
||
| 28 | if (!(Hash::check($request->get('current_password'), Auth::user()->password))) { |
||
| 29 | return redirect()->back()->with("error", "Your current password does not matches with the password you provided. Please try again."); |
||
| 30 | } |
||
| 31 | |||
| 32 | Auth::user()->update($request->only('password')); |
||
| 33 | |||
| 34 | return redirect()->route('profile') |
||
| 35 | ->with('success','Password changed successfully'); |
||
| 36 | } |
||
| 38 |