getDisabled() == 2) { return false; } $oAuthenticator =& KTAuthenticationUtil::getAuthenticatorForUser($oUser); return $oAuthenticator->checkPassword($oUser, $sPassword); } function &getAuthenticatorForUser($oUser) { $iSourceId = $oUser->getAuthenticationSourceId(); return KTAuthenticationUtil::getAuthenticatorForSource($iSourceId); } function &getAuthenticationProviderForUser($oUser) { if (PEAR::isError($oUser)) { var_dump($oUser); } $iSourceId = $oUser->getAuthenticationSourceId(); return KTAuthenticationUtil::getAuthenticationProviderForSource($iSourceId); } function &getAuthenticatorForSource($oSource) { $oProvider =& KTAuthenticationUtil::getAuthenticationProviderForSource($oSource); return $oProvider->getAuthenticator($oSource); } function &getAuthenticationProviderForSource($oSource) { if ($oSource) { $oSource =& KTUtil::getObject('KTAuthenticationSource', $oSource); $sProvider = $oSource->getAuthenticationProvider(); $oRegistry =& KTAuthenticationProviderRegistry::getSingleton(); $oProvider =& $oRegistry->getAuthenticationProvider($sProvider); } else { $oProvider = new KTBuiltinAuthenticationProvider; } return $oProvider; } function synchroniseGroupToSource($oGroup) { $oGroup =& KTUtil::getObject('Group', $oGroup); $iSourceId = $oGroup->getAuthenticationSourceId(); $oAuthenticator = KTAuthenticationUtil::getAuthenticatorForSource($iSourceId); return $oAuthenticator->synchroniseGroup($oGroup); } function autoSignup($sUsername, $sPassword, $aExtra) { $aSources = KTAuthenticationSource::getSources(); foreach ($aSources as $oSource) { $oProvider = KTAuthenticationUtil::getAuthenticationProviderForSource($oSource); $res = $oProvider->autoSignup($sUsername, $sPassword, $aExtra, $oSource); if ($res) { return $res; } } return false; } }