This is called from Email.create already (which is how this creates emails) - to be cautious an extra
change ensures that if the primary email is deleled & another is promoted it is called
}
}
- // update the UF user_unique_id if that has changed
- CRM_Core_BAO_UFMatch::updateUFName($contact->id);
-
if (!empty($params['custom']) &&
is_array($params['custom'])
) {
if ($dao->fetch()) {
$dao->is_primary = 1;
$dao->save();
+ if ($type === 'Email') {
+ CRM_Core_BAO_UFMatch::updateUFName($dao->contact_id);
+ }
}
}
}