[5.2] Fix of backward compatibility for Login event arguments
Pull Request for Issue # .
Summary of Changes
This is fix for extensions which triggers onUserAfterLogin, onUserAfterLogout, onUserLoginFailure, onUserLogoutFailure events in their code. Prior Joomla 5 these events had 1 argument, with Joomla 5 they have 2 arguments, to be consisten with onUserLoginEvent and onUserLogiutEvent events.
Testing Instructions
Add following code, in to index.php of the template:
$e1 = new \Joomla\CMS\Event\User\AfterLoginEvent('onFooBar', [['option' => 1]]);
$e2 = new \Joomla\CMS\Event\User\LoginFailureEvent('onFooBar', [['user' => 1]]);
$e3 = new \Joomla\CMS\Event\User\LogoutFailureEvent('onFooBar', [['user' => 1]]);
dd($e1, $e2, $e3);
Actual result BEFORE applying this Pull Request
An error page.
Expected result AFTER applying this Pull Request
Dump of event objects, on blank page.
Link to documentations
Please select:
- [ ] Documentation link for docs.joomla.org:
- [ ] No documentation changes for docs.joomla.org needed
- [ ] Pull Request link for manual.joomla.org:
- [ ] No documentation changes for manual.joomla.org needed
I have tested this item :white_check_mark: successfully on 0cfd1205f84a557967e755ab34d134e0a3b663e1
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43934.
I have tested this item :white_check_mark: successfully on 0cfd1205f84a557967e755ab34d134e0a3b663e1
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43934.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43934.
Thank you for your contribution @Fedik!