Patch for "main" branch: https://reviews.mahara.org/c/mahara/+/13234
-- 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: In Progress 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

