protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Set part description
- $this->setObjectDescription("A filter for username validation");
-
- // Create unique ID number
- $this->generateUniqueId();
}
/**
// If this instance is created then the username *does* exist
try {
// Get a new instance
- $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), "createUserByUsername"), array($userName));
+ $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), 'createMemberByUsername'), array($userName));
// Remember this user instance in our registry for later usage
$registry->addInstance('user', $userInstance);
}
// Does the username exist?
- if ((is_null($userInstance)) || (!$userInstance->ifUsernameExists())) {
+ if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) {
// This username is still available
$alreadyTaken = false;
- }
+ } // END - if
// Return the result
return $alreadyTaken;