/** * Checks to see if this user has sessions. * * @param $userid * * @return bool */ public function HasSessions($userid) { if (!$this->database->GetActiveSessions($userid)) { return false; } return true; }
/** * Does this userid already have a session, if so check the IP. * * @param $userid * * @return mixed */ public function HasSession($userid) { return !empty($this->database->GetActiveSessions($userid)) ? true : false; }