Mage2\User\Controllers\MyAccountController::changePasswordPost PHP 메소드

changePasswordPost() 공개 메소드

public changePasswordPost ( ChangePasswordRequest $request )
$request Mage2\User\Requests\ChangePasswordRequest
    public function changePasswordPost(ChangePasswordRequest $request)
    {
        $user = Auth::user();
        if (Hash::check($request->get('current_password'), $user->password)) {
            $user->update(['password' => bcrypt($request->get('password'))]);
            return redirect()->route('my-account.home')->with('notificationText', 'User Password Changed Successfully!');
        } else {
            return redirect()->back()->withErrors(['current_password' => 'Your Current Password Wrong!']);
        }
    }