* Create or update OpenID record.
*
* @param array $params
+ *
* @return CRM_Core_DAO_OpenID
+ *
+ * @throws \API_Exception
+ * @throws \CRM_Core_Exception
*/
public static function add($params) {
+ if (empty($params['id']) || is_numeric($params['is_primary'] ?? NULL)) {
+ CRM_Core_BAO_Block::handlePrimary($params, __CLASS__);
+ }
return self::writeRecord($params);
}
* Input parameters to find object.
*
* @return mixed
+ * @throws \CRM_Core_Exception
*/
public static function &getValues($entityBlock) {
return CRM_Core_BAO_Block::getValues('openid', $entityBlock);
*/
class api_v3_OpenIDTest extends CiviUnitTestCase {
+ /**
+ * Should location types be checked to ensure primary addresses are correctly assigned after each test.
+ *
+ * @var bool
+ */
+ protected $isLocationTypesOnPostAssert = TRUE;
+
protected $_params;
protected $id;
protected $_entity;