** Changed in: mahara/22.04 Milestone: 22.04.0 => 22.04rc2 -- 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: In Progress Status in Mahara 20.10 series: In Progress Status in Mahara 21.04 series: In Progress Status in Mahara 21.10 series: In Progress Status in Mahara 22.04 series: In Progress 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: e...@example.com and e...@example.net where e...@example.com is the primary email id | artefact_email | artefact_id | artefact_internal_profile_email | principal ----+----------------+-------------+---------------------------------+----------- 7 | e...@example.com | 7 | e...@example.com | 1 8 | e...@example.net | 8 | e...@example.net | 0 and I try to update the email via set_profile_field($userid, 'email', 'e...@example.net'); 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 | e...@example.net | 7 | e...@example.com | 1 8 | e...@example.net | 8 | e...@example.net | 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 : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp