Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle Backend - User creation failure with email conflict #710

Closed
jbpenrath opened this issue Mar 26, 2024 · 2 comments
Closed

Moodle Backend - User creation failure with email conflict #710

jbpenrath opened this issue Mar 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jbpenrath
Copy link
Member

jbpenrath commented Mar 26, 2024

Bug Report

Problematic behavior
With the Moodle backend, we have implemented a logic to create a user on the fly if it does not exist on Moodle side. We are looking for moodle user_id through user.username of the related enrollment.

But unfortunately, this logic encounts some conflict. Indeed, Moodle seems to accept only one account per email. But we can have cases where an account has been previously created on Moodle with a given email (e.g: for administrator). At this stage, this account is not sync with Joanie so username for those accounts can be different. Then when this kind of user wants to enroll to a course run, Joanie is not able to retrieve a Moodle user_id through user.username so we try to create a new user and then BOOM ! Moodle refuses to create the user as already one exists with the provided email ...

Expected behavior/code
If a Moodle account exists for a given email, we should not try to create a new user. Are we able to update it ?

Additional context/Screenshots
https://gip-fun-mooc.sentry.io/issues/5098652962/?project=6599941&query=is:unresolved&statsPeriod=7d&stream_index=4

@jbpenrath jbpenrath added the bug Something isn't working label Mar 26, 2024
@jbpenrath jbpenrath changed the title Moodle Backend - User creation failure Moodle Backend - User creation failure with email conflict Mar 26, 2024
@kernicPanel
Copy link
Member

@kernicPanel
Copy link
Member

We well need to do the same steps than #732 (comment)

@kernicPanel kernicPanel self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants