罐子甚至罐子都面临着问题

时间:2018-10-05 17:16:29

标签: javamail

即使存在jar文件,我也遇到以下错误。请有人帮助我。

感谢和问候, 伊斯兰教徒。

public function changepassword(Request $request){
    $user = Auth::guard()->user();
    $request_data = $request->All();
    $validator = $this->admin_credential_rules($request_data);
    if($validator->fails()) {
        $errors = $validator->errors();
        $errors = json_decode($errors);

        return response()->json([
            'success' => false,
            'message' => $errors
        ], 422);
    } else {

        $current_password = $user->password;
        if(md5($request_data['password']) == $current_password) {
            $user_id = $user->id;
            $obj_user = User::find($user_id);
            $obj_user->password = md5($request_data['new_password']);
            $obj_user->save();

            $msg = "password has been changed";
            return response()->json(array('change_password'=> $msg), 200);
        } else {
            $error = array('error' => array('Heslo, které jste zadali, je neplatné.'));
            return response()->json([
                'modal_message_danger' , "Heslo, které jste zadali, je neplatné.",
                'message' => $error
            ], 422);
        }
    }
}

0 个答案:

没有答案