Back to AbstractMenu class

Method getUser

protected \Joomla\CMS\User\User
getUser
()
Internal getter for the user. Returns the injected one if any, or the current one if none.
Returns
  • \Joomla\CMS\User\User
Since
  • 3.9.26
Class: AbstractMenu
Project: Joomla

Method getUser - Source code

/**
 * Internal getter for the user. Returns the injected
 * one if any, or the current one if none.
 *
 * @return User
 *
 * @since 3.9.26
 */
protected function getUser()
{
    return empty($this->storedUser) ? Factory::getUser() : $this->storedUser;
}