User tests: Successful: Unsuccessful:
Pull Request resolves # .
As title says, this PR replaces the deprecated method call Factory::getUser() in SiteApplication and AdministratorApplication classes by getIdentity() method.
It is safe for this replacement because at very early application execution, it import behaviour and system plugins https://github.com/joomla/joomla-cms/blob/6.2-dev/libraries/src/Application/CMSApplication.php#L305. Inside these code, Joomla calls Factory::getUser() and at that time, session is started and it trigger this method https://github.com/joomla/joomla-cms/blob/6.2-dev/libraries/src/Application/WebApplication.php#L355 which loads current user into application.
In short, the user object is loaded into application identity at very early state in application life cycle, so it is safe to use getIdentity method to get current user instead of using deprecated method Factory::getUser() for site, admin and api applications.
Works, but uses deprecated method call Factory::getUser()
Works, without using deprecated method call Factory::getUser()
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
I have tested this item ✅ successfully on 14c5606
I have tested this item ✅ successfully on 14c5606
No regressions observed in site/admin flows.
I have tested this item ✅ successfully on 14c5606
No regressions observed in site/admin flows.
| Status | Pending | ⇒ | Ready to Commit |
RTC
RTC
I have tested this item ✅ successfully on 14c5606
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47698.