/** * Checks whether the current FE user (if any is logged in) could register * for the current event, not checking the event's vacancies yet. * So this function only checks whether the user is logged in and isn't blocked for the event's duration yet. * * Note: This function does not check whether a logged-in front-end user fulfills all requirements for an event. * * @param tx_seminars_seminar $seminar a seminar for which we'll check if it is possible to register * * @return bool TRUE if the user could register for the given event, FALSE otherwise */ private function couldThisUserRegister(tx_seminars_seminar $seminar) { // A user can register either if the event allows multiple registrations // or the user isn't registered yet and isn't blocked either. return $seminar->allowsMultipleRegistrations() || !$this->isUserRegistered($seminar) && !$this->isUserBlocked($seminar); }