You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
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
throughuser.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
throughuser.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
The text was updated successfully, but these errors were encountered: