find_by_instanceid_username can cause error

Bug #1853364 reported by Robert Lyon on 2019-11-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 20.04
19.10
High
Unassigned
20.04
High
Unassigned

Bug Description

When checking for a user against remote name and no users returned

error(2, "First parameter must either be an object or the na...", "../auth/user.php", 336, array(size 3)) at Unknown:0
property_exists(false, "probation") at ../auth/user.php:336
User->populate(false) at ../auth/user.php:287
User->find_by_instanceid_username("33", "prova", true) at ../auth/xmlrpc/lib.php:154

We made some adjustments to the way find_by_instanceid_username() works but there is still a bit of logic to sort out

Robert Lyon (robertl-9) on 2019-11-20
Changed in mahara:
importance: Undecided → High

Reviewed: https://reviews.mahara.org/10618
Committed: https://git.mahara.org/mahara/mahara/commit/ac8f3a5fb00263a17158c7c666f9a28fcc4e8e13
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit ac8f3a5fb00263a17158c7c666f9a28fcc4e8e13
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 08:54:44 2019 +1300

Bug 1853364: Only populating the user object if user found

behatnotneeded

Change-Id: Ia1351273cc400a61370381403d968e3f4534ae13
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/10626
Committed: https://git.mahara.org/mahara/mahara/commit/66f6fc94745687eed57df82d5f13ce1dfd215260
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 66f6fc94745687eed57df82d5f13ce1dfd215260
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 08:54:44 2019 +1300

Bug 1853364: Only populating the user object if user found

behatnotneeded

Change-Id: Ia1351273cc400a61370381403d968e3f4534ae13
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit ac8f3a5fb00263a17158c7c666f9a28fcc4e8e13)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers