/** * @return boolean */ public function getIsOnline() { // check if last login was within 2h if (method_exists($this->getLastlogin(), 'getTimestamp') && $this->getLastlogin()->getTimestamp() > time() - 2 * 60 * 60 && \In2\Femanager\Utility\Div::checkFrontendSessionToUser($this)) { return TRUE; } return $this->isOnline; }