1

Thank you in advance for your help.

I am creating a "Single Sign On" for a Joomla site and have reached the final stages. The user is providing a username & password to authenticate with a 3rd party database other than the database Joomla uses so we are not actually logging anyone in who does not provide a username and password (all of our users create their accounts on our main website which is not a Joomla website).

I have been able to log a user in who authenticated on our main website by using the function mentioned (onUserLogin) in this question asked on Stack Exchange:

joomla.stackexchange.com/questions/4149/logging-in-user-without-getting-password-from-them

There is a function called onUserLogin mentioned in that question and this function allows me to log in the user. I think the function onUserLogin is logging the user in based on the username on the account, but I need to log them in based on a unique "company id" we setup and is available in the user table in Joomla (we added an additional field to the user table).

What I am hoping someone might be able to do is let me know how I need to change the function to use the custom field we added vs the username (if it is in fact using the username at this time).

Thanks again for any help you can provide.

1

The best way to integrate a different authentication method is creating a new authentication plugin.

There is already several examples already installed in your Joomla site. You can find them in plugins/authentication folder.

PlgAuthenticationJoomla is the default plugin. But you can choose any of them to create your own "Single Sign On" plugin.

You can find a detailed article in Joomla Docs: Creating an Authentication Plugin for Joomla

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.