- // By default no method is selected
- $method = null;
- $data = "";
-
- // Detect login method (username or email) and try to get a userinstance
- if (!is_null($requestInstance->getRequestElement('user'))) {
- // Username found!
- $method = 'createGuestByUsername';
- $data = $requestInstance->getRequestElement('user');
- } // END - if
-
- // Is a method detected?
- if (is_null($method)) {
- // Then abort here
- throw new UserAuthMethodException($this, self::EXCEPTION_MISSING_METHOD);
- } elseif (!method_exists($this->getConfigInstance()->getConfigEntry('guest_class'), $method)) {
- // The method is invalid!
- throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD);
- }
-