protected function signIn($cookieExp) { if (!$this->getOrganisations()->hasRows()) { throw new UserException('The user do not belong to any organisation.', 50); } parent::signIn($cookieExp); }