Elgg\ActionsService::validateTokenTimestamp PHP Method

validateTokenTimestamp() protected method

Is the token timestamp within acceptable range?
protected validateTokenTimestamp ( integer $ts ) : boolean
$ts integer timestamp from the CSRF token
return boolean
    protected function validateTokenTimestamp($ts)
    {
        $timeout = $this->getActionTokenTimeout();
        $now = $this->getCurrentTime()->getTimestamp();
        return $timeout == 0 || $ts > $now - $timeout && $ts < $now + $timeout;
    }