public function disable(UserConfigurationListener $listener, User $user, AreaContract $area)
    {
        try {
            $userConfig = $this->getUserConfig($user, $area);

            $this->userConfigRepository->markAsDisabledById($userConfig->id);

            $msg = trans('antares/two_factor_auth::configuration.responses.disable.success', ['area' => $area->getLabel()]);

            return $listener->disableSuccess($msg);
        } catch (Exception $e) {
            Log::emergency($e);

            $msg = trans('antares/two_factor_auth::configuration.responses.disable.fail', ['area' => $area->getLabel()]);

            return $listener->disableFailed($msg);
        }
    }
public function disable(UserConfigurationListener $listener, User $user, AreaContract $area)
    {
        try {
            $userConfig = $this->getUserConfig($user, $area);

            $this->userConfigRepository->markAsDisabledById($userConfig->id);

            $msg = trans('antares/two_factor_auth::configuration.responses.disable.success', ['area' => $area->getLabel()]);

            return $listener->disableSuccess($msg);
        } catch (Exception $e) {
            Log::emergency($e);

            $msg = trans('antares/two_factor_auth::configuration.responses.disable.fail', ['area' => $area->getLabel()]);

            return $listener->disableFailed($msg);
        }
    }
public function disable ( UserConfigurationListener $ listener , User $ user , AreaContract $ area ) { try { $ userConfig = $ this -> getUserConfig ( $ user , $ area ) ; $ this -> userConfigRepository -> markAsDisabledById ( $ userConfig -> id ) ; $ msg = trans ( 'antares/two_factor_auth::configuration.responses.disable.success' , [ 'area' => $ area -> getLabel ( ) ] ) ; return $ listener -> disableSuccess ( $ msg ) ; } catch ( Exception $ e ) { Log :: emergency ( $ e ) ; $ msg = trans ( 'antares/two_factor_auth::configuration.responses.disable.fail' , [ 'area' => $ area -> getLabel ( ) ] ) ; return $ listener -> disableFailed ( $ msg ) ; } }
Disable the provider for the user in the selected area.

@param UserConfigurationListener $listener
@param User $user
@param AreaContract $area
@return mixed
Disable the provider for the user in the selected area .