User tests: Successful: Unsuccessful:
Pull Request resolves # .
This PR continues the effort to reduce usages of deprecated code in the CMS.
It replaces calls to the deprecated Factory::getUser() method with getIdentity() where it is safe to do so.
In CMSApplication and its child classes (SiteApplication, AdministratorApplication, and ApiApplication), the application identity is initialized very early in the application lifecycle, almost when application started (exactly after this line of code https://github.com/joomla/joomla-cms/blob/6.2-dev/libraries/src/Application/CMSApplication.php#L305),
As a result, code executed later in the request lifecycle can safely use getIdentity() instead of the deprecated Factory::getUser() call.
This is not a blind search-and-replace operation. Only code paths that are executed after the application identity has been initialized have been updated. The changes are therefore limited to areas such as HTML layouts, HTML services, and HTML helpers, where the application identity is guaranteed to be available.
Works. But uses deprecated method
Works, without using deprecated method.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_finder Templates (admin) Layout Libraries |