use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Get username from request
$userName = $requestInstance->getRequestElement('user');
// Is the username set?
if (is_null($userName)) {
// Not found in form so stop the filtering process
// Get username from request
$userName = $requestInstance->getRequestElement('user');
// Is the username set?
if (is_null($userName)) {
// Not found in form so stop the filtering process
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
} elseif (empty($userName)) {
// Empty field!
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
} elseif (empty($userName)) {
// Empty field!
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
} elseif ($this->ifUserGuestIsTaken($userName) === false) {
// Username is already taken
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
} elseif ($this->ifUserGuestIsTaken($userName) === false) {
// Username is already taken
* @param $userName Username to check for existence
* @return $alreadyTaken Whether the username has been taken
*/
* @param $userName Username to check for existence
* @return $alreadyTaken Whether the username has been taken
*/
$userInstance->setUserGuest($userName);
} else {
// If this instance is created then the username *does* exist
try {
// Get a new instance
$userInstance->setUserGuest($userName);
} else {
// If this instance is created then the username *does* exist
try {
// Get a new instance
- $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName));
+ $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName));