** Changed in: mahara/20.10
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1966138
Title:
The set_profile_field() function for email doesn't check for doubleups
Status in Mahara:
Fix Committed
Status in Mahara 20.10 series:
Fix Released
Status in Mahara 21.04 series:
Fix Committed
Status in Mahara 21.10 series:
Fix Committed
Status in Mahara 22.04 series:
Fix Committed
Bug description:
If I have an account where there is only one email address and I call
the set_profile_field() to update the account to a new email address,
eg set_profile_field($userid, 'email', $newemail);
It will update the person to have the new email address as their
primary address.
However, if I have the situation where the person already has two addresses,
say:
[email protected] and [email protected] where [email protected] is the primary
email
id | artefact_email | artefact_id | artefact_internal_profile_email |
principal
----+----------------+-------------+---------------------------------+-----------
7 | [email protected] | 7 | [email protected] |
1
8 | [email protected] | 8 | [email protected] |
0
and I try to update the email via set_profile_field($userid, 'email',
'[email protected]');
the function fetches the primary address one and tries to update it to the
new address and I end up with:
id | artefact_email | artefact_id | artefact_internal_profile_email |
principal
----+----------------+-------------+---------------------------------+-----------
7 | [email protected] | 7 | [email protected] |
1
8 | [email protected] | 8 | [email protected] |
0
Where there is a mismatch on the primary email line.
We need the set_profile_field() for email to check that the email
value we are setting the primary email to doesn't already exist for
this person as one of their secondary emails
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1966138/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help : https://help.launchpad.net/ListHelp