Ich habe eine api bekam die joomla Benutzer authentifizieren, Passwort. Obwohl es perfekt in Joomla 2.5 funktioniert, es wird geben Anwendung Instanziierung Fehler in Joomla 3.5. Der Teil des Codes ist wie folgt:Joomla JAuthentication geben Anwendung Instanziierung Fehler
Funktion checkAuthentication ($ username, $ password) {
jimport('joomla.user.authentication');
$auth = & JAuthentication::getInstance();
$credentials = array('username' => $username, 'password' => $password);
$options = array();
$response = $auth->authenticate($credentials, $options);
if ($response->status != JAUTHENTICATE_STATUS_SUCCESS)
{
echo "Failure";
}
else
{
echo "Success~" . $username;
}
}
Es befindet sich auf der Linie $ auth andernfalls = & JAuthentication :: getInstance();
Ich habe alle Konfiguration wie db-Einstellungen usw. in der Konfigurationsdatei überprüft. Kann mir bitte jemand helfen, den Grund herauszufinden.
Vielen Dank Sean! Es hat perfekt funktioniert. –