Back to User class

Method setLastVisit

public bool
setLastVisit
(mixed $timestamp = null)
Pass through method to the table for setting the last visit date
Parameters
  • int $timestamp The timestamp, defaults to 'now'.
Returns
  • bool True on success.
Since
  • 1.7.0
Class: User
Project: Joomla

Method setLastVisit - Source code

/**
 * Pass through method to the table for setting the last visit date
 *
 * @param   integer  $timestamp  The timestamp, defaults to 'now'.
 *
 * @return  boolean  True on success.
 *
 * @since   1.7.0
 */
public function setLastVisit($timestamp = null)
{
    // Create the user table object
    /** @var \Joomla\CMS\Table\User $table */
    $table = $this->getTable();
    $table->load($this->id);
    return $table->setLastVisit($timestamp);
}