Back to CategoryNode class

Method getAuthor

public \Joomla\CMS\User\User
getAuthor
(mixed $modifiedUser = false)
Returns the user that created the category
Parameters
  • bool $modifiedUser Returns the modified_user when set to true
Returns
  • \Joomla\CMS\User\User A User object containing a userid
Since
  • 1.6
Class: CategoryNode
Project: Joomla

Method getAuthor - Source code

/**
 * Returns the user that created the category
 *
 * @param   boolean  $modifiedUser  Returns the modified_user when set to true
 *
 * @return  \Joomla\CMS\User\User  A User object containing a userid
 *
 * @since   1.6
 */
public function getAuthor($modifiedUser = false)
{
    if ($modifiedUser) {
        return Factory::getUser($this->modified_user_id);
    }
    return Factory::getUser($this->created_user_id);
}