예제 #1
0
 /**
  * Retrieves info about this user's last known state associated
  * with an alert that they have responded to.
  *
  * @param int $alert_id
  *
  * @return array
  */
 public function get_incident_response_info($alert_id)
 {
     $alert = new WP_Buoy_Alert($alert_id);
     $r = array('id' => $this->wp_user->ID, 'display_name' => $this->wp_user->display_name, 'avatar_url' => get_avatar_url($this->wp_user->ID, array('size' => 32)), 'geo' => $alert->get_responder_geo($this->wp_user->ID));
     if ($phone = $this->get_phone_number()) {
         $r['call'] = $phone;
     }
     return $r;
 }