Autologin Plugin using external table
Posted: Mon Sep 10, 2007 5:11 pm
I'm writing my first plugin for Joomla 1.5.
The goal I'm trying to achieve is an autologin plugin, using user and client data from external database. I want to use Joomla 1.5 for an Intranet and I don't have access to a decent LDAP.
When a user logs in into windows, their username, ip-address, date and time are logged in a separate MySQL table.
I wrote a authentication plugin based on the original Joomla Authentication plugin. When a user clicks "Login" in the Login Form, the plugin queries the seperate MySQL table for the ip-address of the client, returns the corresponding username and logs the user in into Joomla without filling in a username or password.
The next step is adapting the existing plugin or creating a new plugin so that the user gets logged in automatically when accessing the website, but I'm not sure how to proceed.
Do I have to use the onAfterInitialise function (like in the "System - Remember Me"-plugin) or is there another (better) solution?
The goal I'm trying to achieve is an autologin plugin, using user and client data from external database. I want to use Joomla 1.5 for an Intranet and I don't have access to a decent LDAP.
When a user logs in into windows, their username, ip-address, date and time are logged in a separate MySQL table.
I wrote a authentication plugin based on the original Joomla Authentication plugin. When a user clicks "Login" in the Login Form, the plugin queries the seperate MySQL table for the ip-address of the client, returns the corresponding username and logs the user in into Joomla without filling in a username or password.
The next step is adapting the existing plugin or creating a new plugin so that the user gets logged in automatically when accessing the website, but I'm not sure how to proceed.
Do I have to use the onAfterInitialise function (like in the "System - Remember Me"-plugin) or is there another (better) solution?