The Joomla core plugin LDAP authentification does not seem to trigger the onUserLogin-event from the user-plugins. This is needed for redirection on login.
When using the Joomla authentification, the event is triggered and all works fine. When using the LDAP plugin the whole event is ignored.
Might be the same for the gmail authentification plugin.
LDAP authentification does not trigger onUserLogin-event?
Moderator: ooffick
Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
- carsten888
- Joomla! Ace
- Posts: 1224
- Joined: Sat Feb 11, 2006 8:32 am
- Contact:
LDAP authentification does not trigger onUserLogin-event?
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
Re: LDAP authentification does not trigger onUserLogin-event?
The authentication plugins are not responsible for dispatching any of the user events for successful or failed login. That's all done in the application class. You will need to step through the LDAP plugin to see if it is doing something to short circuit the request cycle (which would prevent the follow-on events from being dispatched) or step through Joomla\CMS\Application\CMSApplication::login() to determine if the event is properly being dispatched or if not why it wouldn't be (which could mean checking the Joomla\CMS\Authentication\Authentication class for any concerns, as well as other authentication plugins).
- carsten888
- Joomla! Ace
- Posts: 1224
- Joined: Sat Feb 11, 2006 8:32 am
- Contact:
Re: LDAP authentification does not trigger onUserLogin-event?
Yes thats what I came to as well. The Joomla authentification plugin also has no code to trigger an event, just return the login status and message.The authentication plugins are not responsible for dispatching any of the user events for successful or failed login. That's all done in the application class.
To make sure I make a test-authentification plugin which just returns true. It did fire, but the user was not logged in. So yes, got to be something else then the authentification plugins, deeper in the Joomla system.You will need to step through the LDAP plugin to see if it is doing something to short circuit the request cycle (which would prevent the follow-on events from being dispatched)
So I guess this is a Joomla bug.
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
- Per Yngve Berg
- Joomla! Master
- Posts: 30945
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: LDAP authentification does not trigger onUserLogin-event?
The plugin must return username, full name and email in order to log the user in.
- carsten888
- Joomla! Ace
- Posts: 1224
- Joined: Sat Feb 11, 2006 8:32 am
- Contact:
Re: LDAP authentification does not trigger onUserLogin-event?
you are right. It does login like that.Per Yngve Berg wrote: ↑Thu Jul 18, 2019 3:57 pmThe plugin must return username, full name and email in order to log the user in.
Code: Select all
class PlgAuthenticationTest extends JPlugin
{
public function onUserAuthenticate($credentials, $options, &$response)
{
$response->type = 'test';
$response->email = '[email protected]';
$response->fullname = 'qq';
$response->language = '';
$response->status = JAuthentication::STATUS_SUCCESS;
$response->error_message = '';
return true;
}
}
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...