Merge pull request #14981 from eileenmcnaughton/load_extract
[civicrm-core.git] / api / v3 / OpenID.php
index da41b99d897a113fe3ac41dfa965ee07a9409947..6066355e14ed487bab6f14ea0f13df7d64fbbfae 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -53,6 +53,10 @@ function civicrm_api3_open_i_d_create($params) {
  */
 function _civicrm_api3_open_i_d_create_spec(&$params) {
   $params['contact_id']['api.required'] = 1;
+  $defaultLocation = CRM_Core_BAO_LocationType::getDefault();
+  if ($defaultLocation) {
+    $params['location_type_id']['api.default'] = $defaultLocation->id;
+  }
 }
 
 /**