Notifying listeners after enabling/disabling a user.

@param user
the user which is used in enabling/disabling operation
@throws Exception
if any listener failed to handle the event
420445
private void postSetEnabled(User user) throws Exception
   {
      for (UserEventListener listener : listeners)
         listener.postSetEnabled(user);
   }
125237
public void delete(boolean notifyUser, boolean force) {
        String queryString = new QueryStringBuilder()
            .appendParam("notify", String.valueOf(notifyUser))
            .appendParam("force", String.valueOf(force))
            .toString();

        URL url = USER_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
        BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
        BoxAPIResponse response = request.send();
        response.disconnect();
    }
839033
public ResponseWrapper forbidUser(String username, boolean disable)
            throws APIConnectionException, APIRequestException {
        return _userClient.forbidUser(username, disable);
    }
1291600
protected void notifyHandlers(ApiUser apiUser, ApiDisconnectionImpl disconnection) {
        for(ServerHandlerClass handler : handlers) {
            ReflectMethodUtil.invokeHandleMethod(
                    handler.getHandleMethod(), 
                    handler.newInstance(), 
                    context, 
                    disconnection);
        }
    }
277489
public synchronized void release(Object user) {
		usage--;
		if (users != null) {
			if (!users.remove(user))
				LCCore.getApplication().getDefaultLogger()
				.error("CachedObject released by " + user + " but not in users list", new Exception());
		}
	}
1314241
public function handleEvent(Event $event, UserNotificationEventHandler $service)
    {
        // If our event is the wrong type, just do a null/void return
        if (!$event instanceof DeactivateUser) {
            return;
        }

        $entity = $event->getUserEntity();

        if ($entity) {
            $service->deactivated($event);
        }
    }
245434
public function enable(UserConfigurationListener $listener, User $user, AreaContract $area)
    {
        try {
            $userConfig = $this->getUserConfig($user, $area);

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

            if ($this->isConfigured($area)) {
                $msg = trans('antares/two_factor_auth::configuration.responses.enable.success', ['area' => $area->getLabel()]);
                return $listener->afterConfiguration($area, $msg);
            }

            return $this->configure($listener, $area);
        } catch (Exception $e) {
            Log::emergency($e);

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

            return $listener->enableFailed($msg);
        }
    }
898293
public static void setUser(Object user)
    {
        HttpSession session = WebContextFactory.get().getSession(true);
        session.setAttribute(USER, user);
    }
144110
public void actionUnlockUser() throws Exception {

        CmsUUID userId = new CmsUUID(m_paramUserId);
        CmsObject cms = getCms();
        CmsUser user = cms.readUser(userId);
        OpenCms.getLoginManager().unlockUser(getCms(), user);
        actionCloseDialog();
    }
109914
private void notifyListener(RequestResponseClass clazz, 
	        ISFSObject params, User user, Object userAgent) throws Exception {
	    Object listener = clazz.newInstance();
	    setDataToListener(clazz, listener, params);
	    invokeExecuteMethod(clazz.getExecuteMethod(), listener, userAgent);
	    responseClient(clazz, listener, user);
	}
610516
public void addListeners()
    {
        String strUserName = this.getProperty(DBParams.USER_NAME);
        this.getScreenRecord().getField(UserScreenRecord.USER).setString(strUserName);
        
        String strMessage = "Login required";
        if (this.getTask() != null)
            if (this.getTask().getApplication() != null)
        {
            BaseApplication application = (BaseApplication)this.getTask().getApplication();
            strMessage = application.getResources(ResourceConstants.ERROR_RESOURCE, true).getString(strMessage);
            this.getScreenRecord().getField(UserScreenRecord.STATUS_LINE).setString(strMessage);
        }
        
        super.addListeners();
    }
1234967
public E registerUser(E user, HttpServletRequest request) throws Exception {

        String email = user.getEmail();

        // check if a user with the email already exists
        E existingUser = dao.findByEmail(email);

        if (existingUser != null) {
            final String errorMessage = "User with eMail '" + email + "' already exists.";
            LOG.info(errorMessage);
            throw new Exception(errorMessage);
        }

        user = (E) this.persistNewUser(user, true);

        // create a token for the user and send an email with an "activation" link
        registrationTokenService.sendRegistrationActivationMail(request, user);

        return user;
    }
870920
public void login(String user) throws AppEngineException {
    Preconditions.checkNotNull(user);
    if (!EMAIL_PATTERN.matcher(user).find()) {
      throw new AppEngineException("Invalid email address: " + user);
    }
    try {
      runner.run(ImmutableList.of("auth", "login", user), null);
    } catch (ProcessHandlerException | IOException ex) {
      throw new AppEngineException(ex);
    }
  }
278128
public function resetUserConfig(UsersListener $listener, User $user)
    {
        try {
            $this->userConfigRepository->deleteByUserId($user->id);
            return $listener->resetSuccess();
        } catch (Exception $e) {
            Log::emergency($e->getMessage());
            return $listener->resetFailed();
        }
    }
827074
public void afterPropertiesSet() throws Exception {
        if (target == null) {
            throw new IllegalArgumentException(
                    "Property 'target' must be set.'");
        }

        if (defaultUser == null) {
            throw new IllegalArgumentException(
                    "Property 'defaultUser' must be set.'");
        }

        if (defaultPassword == null) {
            throw new IllegalArgumentException(
                    "Property 'defaultPassword' must be set.'");
        }
    }
1228576
@RestrictTo(LIBRARY)
	public void notifyUseCaseStart(UseCaseListener listener) {
		try {
			LOGGER.debug("Notifying " + getClass().getSimpleName() + " start to listener " + listener.getClass().getSimpleName());
			listener.onStartUseCase();
		} catch (Exception e) {
			AbstractException abstractException = wrapException(e);
			logHandledException(abstractException);
		}
	}
160287
private void fireUserInputChange() {
		if (!internallySettingText && (this.listeners != null)) {
			for (Iterator it = this.listeners.iterator(); it.hasNext();) {
				UserInputListener userInputListener = (UserInputListener) it.next();
				userInputListener.update(this);
			}
		}
	}