@@ -255,27 +255,26 @@ public function changePassword()
255
255
*/
256
256
public function changePasswordUpdate (Request $ request )
257
257
{
258
- $ id = auth ()->user ()->id ;
258
+ $ module_title = $ this ->module_title ;
259
+ $ module_name = $ this ->module_name ;
260
+ $ module_path = $ this ->module_path ;
261
+ $ module_icon = $ this ->module_icon ;
262
+ $ module_model = $ this ->module_model ;
263
+ $ module_name_singular = Str::singular ($ module_name );
259
264
260
- if ($ id !== auth ()->user ()->id ) {
261
- return redirect ()->route ('frontend.users.profile ' , encode_id (auth ()->user ()->id ));
262
- }
265
+ $ module_action = 'change Password Update ' ;
263
266
264
- $ request ->validate ($ request , [
267
+ $ validated = $ request ->validate ([
265
268
'password ' => 'required|confirmed|min:6 ' ,
266
269
]);
267
270
268
- $ module_name = $ this ->module_name ;
269
- $ module_name_singular = Str::singular ($ this ->module_name );
270
-
271
271
$ $ module_name_singular = auth ()->user ();
272
272
273
- $ request_data = $ request ->only ('password ' );
274
- $ request_data ['password ' ] = Hash::make ($ request_data ['password ' ]);
273
+ $ validated ['password ' ] = Hash::make ($ validated ['password ' ]);
275
274
276
- $ $ module_name_singular ->update ($ request_data );
275
+ $ $ module_name_singular ->update ($ validated );
277
276
278
- return redirect ()->route ('frontend.users.profile ' , encode_id ( auth ()-> user ()-> id ) )->with ('flash_success ' , 'Update successful! ' );
277
+ return redirect ()->route ('frontend.users.profile ' )->with ('flash_success ' , 'Update successful! ' );
279
278
}
280
279
281
280
/**
0 commit comments