Example #1
0
 /**
  * check if new user registration is allowed
  * @param UserModel $self
  * @param $pkeys
  * @return bool
  * @throws Exception\RegistrationException
  */
 public function beforeInsertEvent($self, $pkeys)
 {
     $registrationStatus = Controller\Controller::getRegistrationStatus();
     switch ($registrationStatus) {
         case 0:
             $f3 = self::getF3();
             throw new Exception\RegistrationException($f3->get('PATHFINDER.REGISTRATION.MSG_DISABLED'));
             break;
         case 1:
             return true;
             break;
         default:
             return false;
     }
 }