Example #1
0
 private function pull($lead_id)
 {
     // Todo: Check cache time and fetch new data
     if (self::has($lead_id)) {
         return;
     }
     $lead = Request::getUserProfile($lead_id);
     if (empty($lead['first_name']) || empty($lead['last_name'])) {
         return;
     }
     // Parse event to array
     $lead['user_id'] = $lead_id;
     $lead['subscribe'] = 1;
     // Then call set method
     self::set($lead);
 }