Error JAuthentication: :__construct: Could not load authenti

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

Hi all,

I installed Joomla 2.5.3 on my website www.polito.it/philofluid/

I think I uninstalled by mistake the joomla authentication plugin, as when I try to login at Joomla! Administration Login, I get this error:

JAuthentication: :__construct: Could not load authentication libraries

I tried to login through the phpMyAdmin and looked for plg_authentication_joomla (extensions table).
My original parameters were:

enabled: 1, access: 1, protected: 1

I tried to change them to:

enabled: 1, access: 1, protected: 0
enabled: 1, access: 0, protected: 1

But neither of them succeeded, as I still get the error.

Does anyone have any idea to help me?
Thanks a lot in advance!

Stefania

Post By: | 09-20-2012 00:50

Can anyone check on his own database, how the items "plg_authentication_joomla" and "plg_user_joomla" are setted?
Mine now are as follows, but still nothing works:

extension_id 401
name plg_authentication_joomla
type plugin
element joomla
folder authentication
client_id 0
enabled 1
access 1
protected 1
manifest_cache
params {}
custom_data
system_data
checked_out 0
checked_out_time 0000-00-00 00:00:00
ordering
state 1


extension_id 432
name plg_user_joomla
type plugin
element joomla
folder user
client_id 0
enabled 1
access 1
protected 0
manifest_cache
params {"autoregister":"1"}
custom_data
system_data
checked_out 0
checked_out_time 0000-00-00 00:00:00
ordering 2
state 1

Any help is really appreciated!

Stefania

Post By: | 09-20-2012 00:50

I changed the existing folders "plugins" and "libraries" through FTP with the original ones of the Joomla 2.5.1 Package.

Then in phpMyAdmin I enabled to 1 all the plg_* items.

But it's still not working.

Is it normal that in phpMyAdmin I have several *_extensions tables? Something like:

a0zfd_extensions
a0zfd_update_sites_extensions
bak_mfoi1_extensions
bak_mfoi1_update_sites_extensions
bak_w0bja_extensions
bak_w0bja_update_sites_extensions
cu89o_extensions
cu89o_update_sites_extensions
gl5wj_extensions

I changed enable=1 to all the plg_* items in all the *_extensions tables I have, but still nothing...
:(

Stefania

Post By: | 09-20-2012 00:50

The file is correct. Any other Authentication Plugin enabled?

What did you do when it stopped working?

Post By: | 09-20-2012 00:50

In the folder plugins/authentication/joomla I have three files:
index.html
joomla.php
joomla.xml

The joomla.php file is the following:

Code:
<?php
/**
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license      GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access
defined('_JEXEC') or die;

/**
 * Joomla Authentication plugin
 *
 * @package      Joomla.Plugin
 * @subpackage   Authentication.joomla
 * @since 1.5
 */
class plgAuthenticationJoomla extends JPlugin
{
   /**
    * This method should handle any authentication and report back to the subject
    *
    * @access   public
    * @param   array   Array holding the user credentials
    * @param   array   Array of extra options
    * @param   object   Authentication response object
    * @return   boolean
    * @since 1.5
    */
   function onUserAuthenticate($credentials, $options, &$response)
   {
      $response->type = 'Joomla';
      // Joomla does not like blank passwords
      if (empty($credentials['password'])) {
         $response->status = JAuthentication::STATUS_FAILURE;
         $response->error_message = JText::_('JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED');
         return false;
      }

      // Initialise variables.
      $conditions = '';

      // Get a database object
      $db      = JFactory::getDbo();
      $query   = $db->getQuery(true);

      $query->select('id, password');
      $query->from('#__users');
      $query->where('username=' . $db->Quote($credentials['username']));

      $db->setQuery($query);
      $result = $db->loadObject();

      if ($result) {
         $parts   = explode(':', $result->password);
         $crypt   = $parts[0];
         $salt   = @$parts[1];
         $testcrypt = JUserHelper::getCryptedPassword($credentials['password'], $salt);

         if ($crypt == $testcrypt) {
            $user = JUser::getInstance($result->id); // Bring this in line with the rest of the system
            $response->email = $user->email;
            $response->fullname = $user->name;
            if (JFactory::getApplication()->isAdmin()) {
               $response->language = $user->getParam('admin_language');
            }
            else {
               $response->language = $user->getParam('language');
            }
            $response->status = JAuthentication::STATUS_SUCCESS;
            $response->error_message = '';
         } else {
            $response->status = JAuthentication::STATUS_FAILURE;
            $response->error_message = JText::_('JGLOBAL_AUTH_INVALID_PASS');
         }
      } else {
         $response->status = JAuthentication::STATUS_FAILURE;
         $response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
      }
   }
}



Anything wrong?

Stefania

Post By: | 09-20-2012 00:50

Do the files (pluginsauthenticationjoomla) exist?

`Reply Or Comment!
Please LogIn to Reply!