mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #65562
[Bug 1966138] [NEW] The set_profile_field() function for email doesn't check for doubleups
Public bug reported:
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:
e1@xxxxxxxxxxx and e2@xxxxxxxxxxx where e1@xxxxxxxxxxx is the primary email
id | artefact_email | artefact_id | artefact_internal_profile_email | principal
----+----------------+-------------+---------------------------------+-----------
7 | e1@xxxxxxxxxxx | 7 | e1@xxxxxxxxxxx | 1
8 | e2@xxxxxxxxxxx | 8 | e2@xxxxxxxxxxx | 0
and I try to update the email via set_profile_field($userid, 'email', 'e2@xxxxxxxxxxx');
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 | e2@xxxxxxxxxxx | 7 | e1@xxxxxxxxxxx | 1
8 | e2@xxxxxxxxxxx | 8 | e2@xxxxxxxxxxx | 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
** Affects: mahara
Importance: High
Assignee: Robert Lyon (robertl-9)
Status: In Progress
** Affects: mahara/20.10
Importance: High
Status: In Progress
** Affects: mahara/21.04
Importance: High
Status: In Progress
** Affects: mahara/21.10
Importance: High
Status: In Progress
** Affects: mahara/22.04
Importance: High
Assignee: Robert Lyon (robertl-9)
Status: In Progress
** Changed in: mahara
Importance: Undecided => High
** Also affects: mahara/22.04
Importance: High
Status: New
** Also affects: mahara/21.04
Importance: Undecided
Status: New
** Also affects: mahara/21.10
Importance: Undecided
Status: New
** Also affects: mahara/20.10
Importance: Undecided
Status: New
** Changed in: mahara/21.10
Importance: Undecided => High
** Changed in: mahara/21.04
Importance: Undecided => High
** Changed in: mahara/20.10
Importance: Undecided => High
** Changed in: mahara/22.04
Status: New => In Progress
** Changed in: mahara/22.04
Milestone: None => 22.04.0
** Changed in: mahara/21.10
Milestone: None => 21.10.2
** Changed in: mahara/21.04
Milestone: None => 21.04.4
** Changed in: mahara/20.10
Milestone: None => 20.10.5
** Changed in: mahara/21.04
Status: New => In Progress
** Changed in: mahara/21.10
Status: New => In Progress
** Changed in: mahara/20.10
Status: New => In Progress
** Changed in: mahara/22.04
Assignee: (unassigned) => Robert Lyon (robertl-9)
--
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:
e1@xxxxxxxxxxx and e2@xxxxxxxxxxx where e1@xxxxxxxxxxx is the primary email
id | artefact_email | artefact_id | artefact_internal_profile_email | principal
----+----------------+-------------+---------------------------------+-----------
7 | e1@xxxxxxxxxxx | 7 | e1@xxxxxxxxxxx | 1
8 | e2@xxxxxxxxxxx | 8 | e2@xxxxxxxxxxx | 0
and I try to update the email via set_profile_field($userid, 'email', 'e2@xxxxxxxxxxx');
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 | e2@xxxxxxxxxxx | 7 | e1@xxxxxxxxxxx | 1
8 | e2@xxxxxxxxxxx | 8 | e2@xxxxxxxxxxx | 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
Follow ups
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Gold, 2022-04-27
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Dianne Tennent, 2022-04-27
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Doris Tam, 2022-04-27
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Robert Lyon, 2022-04-27
-
[Bug 1966138] A change has been merged
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A change has been merged
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A change has been merged
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Robert Lyon, 2022-04-21
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Robert Lyon, 2022-04-21
-
[Bug 1966138] A patch has been submitted for review
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A patch has been submitted for review
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A patch has been submitted for review
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A change has been merged
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Robert Lyon, 2022-04-21
-
[Bug 1966138] A patch has been submitted for review
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] A change has been merged
From: Mahara Bot, 2022-04-21
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Doris Tam, 2022-04-19
-
[Bug 1966138] Re: The set_profile_field() function for email doesn't check for doubleups
From: Robert Lyon, 2022-04-12
-
[Bug 1966138] A patch has been submitted for review
From: Mahara Bot, 2022-03-23