if (is_null($method)) {
// Then abort here
throw new UserLoginMethodException($this, self::EXCEPTION_MISSING_METHOD);
- } elseif (!method_exists("User", $method)) {
+ } elseif (!method_exists($this->getConfigInstance()->readConfig('user_class'), $method)) {
// The method is invalid!
throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD);
}
// Is there an instance?
if (is_null($userInstance)) {
// Get a user instance
- $userInstance = call_user_func_array(array("User", $method), array($data));
+ $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), $method), array($data));
} // END - if
// If we have email login then check if a user account with that email exists!
$userInstance->setEmailAddress($email);
} else {
// If this instance is created then the username *does* exist
- $userInstance = User::createUserByEmail($email);
+ $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), "createUserByEmail"), array($email));
// Remember this user instance in our registry for later usage
$registry->addInstance('user', $userInstance);
// If this instance is created then the username *does* exist
try {
// Get a new instance
- $userInstance = User::createUserByUsername($userName);
+ $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), "createUserByUsername"), array($userName));
// Remember this user instance in our registry for later usage
$registry->addInstance('user', $userInstance);
// CFG: POST-REGISTRATION-ACTION
$cfg->setConfigEntry('post_registration_action', "LoginAfterRegistrationAction");
+// CFG: USER-CLASS
+$cfg->setConfigEntry('user_class', "User");
+
// [EOF]
?>