Example #1
0
 public function setUserCurrentLocation($userId, $latitude, $longitude)
 {
     if (!$userId) {
         return false;
     }
     $location = $this->getUserCurrentLocation($userId);
     if (!$location) {
         $location = new SKADATE_BOL_CurrentLocation();
         $location->userId = $userId;
     }
     $location->latitude = floatval($latitude);
     $location->longitude = floatval($longitude);
     $location->updateTimestamp = time();
     SKADATE_BOL_CurrentLocationDao::getInstance()->save($location);
     return true;
 }
Example #2
0
 public function removeCurrentLocationByUserId($userId)
 {
     SKADATE_BOL_CurrentLocationDao::getInstance()->deleteByUserId($userId);
     return true;
 }