Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function withValidator($validator) |
||
43 | { |
||
44 | $validator->after(function ($validator) { |
||
45 | // check old password matches |
||
46 | if (!Hash::check($this->input('old_password'), backpack_auth()->user()->password)) { |
||
47 | $validator->errors()->add('old_password', trans('backpack::base.old_password_incorrect')); |
||
48 | } |
||
49 | }); |
||
50 | } |
||
51 | } |
||
52 |