Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
185b4e21
Commit
185b4e21
authored
11 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Plain Diff
Merge pull request
#429
from colemanw/userEmail
Fix user email CRM-12285
parents
461096bb
4b6bf55f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/BAO/Email.php
+10
-4
10 additions, 4 deletions
CRM/Core/BAO/Email.php
with
10 additions
and
4 deletions
CRM/Core/BAO/Email.php
+
10
−
4
View file @
185b4e21
...
...
@@ -45,14 +45,20 @@ class CRM_Core_BAO_Email extends CRM_Core_DAO_Email {
* @param array $params input parameters
*/
static
function
create
(
$params
)
{
if
(
is_numeric
(
CRM_Utils_Array
::
value
(
'is_primary'
,
$params
))
||
// if id is set & is_primary isn't we can assume no change
empty
(
$params
[
'id'
])
)
{
// if id is set & is_primary isn't we can assume no change
$alterPrimary
=
is_numeric
(
CRM_Utils_Array
::
value
(
'is_primary'
,
$params
))
||
empty
(
$params
[
'id'
]);
if
(
$alterPrimary
)
{
CRM_Core_BAO_Block
::
handlePrimary
(
$params
,
get_class
());
}
$email
=
CRM_Core_BAO_Email
::
add
(
$params
);
if
(
$alterPrimary
)
{
// update the UF user email if that has changed
CRM_Core_BAO_UFMatch
::
updateUFName
(
$email
->
contact_id
);
}
return
$email
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment