Forums | Mahara Community
Support
/
Moodle > Mahara LTI error
25 September 2024, 3:25
Hi,
So I thought the LTI setup was all fine, there is an external tool for users to click on that then should link or create the users in mahara. This creates a row in auth_remote_user, with auth instance, moodle username (or id) and mahara userid.
In mahara the web service has the permission to auto create users, and also let LDAP remain as parent authority.
It then seems there should be 2 rows per user auth_remote_user. so there's one for LDAP (eg authinstance 3) and one for the webservice (eg 5).
example of 2 rows per user in auth_remote_user:
3, 123, 987
5, s.lewis, 987
But for me it's erroring, when 1 row (with auth 3-LDAP) already exists.
Crashes somehwere around here -line 200
module\lti\webservice\functions\module_lti_launch.php
So basically wondering if anyone else has found this issue. Not sure if my setup is wrong. Or if moodle is sending across the moodle id, instead of the username, or something else.
Or if it's simply a bug (although I can't find a record of it, and I checked the code for 24.04 and it's the same on that file)
Moodle 4.1.11 (PHP 8.1)
Mahara 23.04.X (although checked the code in 24.04 too) (PHP 8.1)
thanks,
Simon
Edits to this post:
- Kristina Hoeppner - 25 September 2024, 8:32
25 September 2024, 8:34
Hi Simon,
LTI does three checks:
- Does the ID exist?
- Does the username exist?
- Does the email address exist?
The last one is the crucial one. In the first instance, can you please check that your email address is not also taken by another account as primary or secondary email address?
Or does everyone have a problem logging in?
Thank you
Kristina
25 September 2024, 21:50
Hi Kristina,
1. Yes the mahara user ID exists
2. Yes the username exists
3. Yes the email address exists
I've found the issue though, it is as you suggested to do with the email. Moodle is passing an incorrect email, so fails when checking mahara table artefact_internal_profile_email.
Looking into it, our newly installed 365 plugin is syncing the email incorrectly (populating with the 365 username rather than the email). Not sure why, as it looks set up correctly. But now I know where to look!
thanks,
Simon
26 September 2024, 8:47
Hi Simon,
Great that you are one step further! All the best troubleshooting the rest of it.
Cheers
Kristina