public boolean verifyUser(Long userId) { User user = _accountMgr.getUserIncludingRemoved(userId); Account account = null; if (user != null) { account = _accountMgr.getAccount(user.getAccountId()); } if ((user == null) || (user.getRemoved() != null) || !user.getState().equals(Account.State.enabled) || (account == null) || !account.getState().equals(Account.State.enabled)) { s_logger.warn( "Deleted/Disabled/Locked user with id=" + userId + " attempting to access public API"); return false; } return true; }