mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #67533
[Bug 1990529] A change has been merged
Reviewed: https://reviews.mahara.org/c/mahara/+/13234
Committed: https://git.mahara.org/mahara/mahara/commit/b9169fe9f2cb57d21820cabce211f623d599ca79
Submitter: "Robert Lyon <robertl@xxxxxxxxxxxxxxx>"
Branch: main
commit b9169fe9f2cb57d21820cabce211f623d599ca79
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Mon Oct 17 10:57:23 2022 +1300
Bug 1990529: set create_user() newuser flag correctly
It should be set regardless if user was created from user object or not
Change-Id: Id65a6349f17824fe10e21dcfa36d5cd77961aa0b
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
--
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/1990529
Title:
MNet user creation failing with timeout
Status in Mahara:
Fix Committed
Bug description:
Mahara version 22.04, Linux, Mysql
The bug resolution in the following commit don't include cases where user is passed to the function create_user() as an instanceof User.
https://github.com/MaharaProject/mahara/commit/e2f7d70f49e2101424255cba8f84b453320ee36d
This is the case with an MNet authentication from moodle.
In this case the function is called from file auth/xmlrpc/lib.php and the object user is created beforehand.
The institution membership notification is fired and the user creation finish after the timeout which is way too long to be seen as a success by the user.
To correct this, you only need to change a line :
--- a/htdocs/lib/user.php
+++ b/htdocs/lib/user.php
@@ -2702,8 +2702,8 @@ function create_user($user, $profile=array(), $institution=null, $remoteauth=nul
$user->expiry = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')) + (int)get_config('defaultaccountlifetime'));
}
$user->id = insert_record('usr', $user, 'id', true);
- $user->newuser = true;
}
+ $user->newuser = true;
if (isset($user->email) && $user->email != '') {
set_profile_field($user->id, 'email', $user->email, TRUE);
Thanks in advance for the correction
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1990529/+subscriptions
References