class SecurityServiceImpl extends RemoteServiceServlet implements SecurityService {

	@Override
	public void deleteUser(long userId) throws ServerException {
		Session session = ServiceUtil.checkMenu(getThreadLocalRequest(), Menu.SECURITY);
		UserDAO userDao = (UserDAO) Context.get().getBean(UserDAO.class);

		// Create the user history event
		UserHistory transaction = new UserHistory();
		transaction.setSession(session);
		transaction.setEvent(UserEvent.DELETED.toString());
		transaction.setComment("");
		transaction.setUser(userDao.findById(userId));

		userDao.delete(userId, transaction);
	}

}