× How To / General

Retrieving moodle userid

3 weeks 2 days ago
Web Buster UK Ltd
Posts: 95
More
Topic Author
Retrieving moodle userid #1
Hi Antonio, is it possible to retrieve a user's moodle id to be mapped onto a field in Joomla/Community Builder?

Currently to retrieve a user's moodle id, we have to query the moodle database each time. If we could have a field within joomla prefilled with the moodle id, it'd make things a lot more convenient.

Please Log in or Create an account to join the conversation.

2 weeks 5 days ago
Antonio Durán
Posts: 7331
More
Retrieving moodle userid #2
Hi.

Sorry for the slow reply, I read your post but needed to check first, and then I forgot about it :(

Right now, you cannot map Moodle user ID field. Also, I don't know if you are syncing profile data from Moodle to Joomla.
We could see if it could be added, as I am not sure.

Other option is to create a simple user plugin that runs after joomdlehooks, an calls Joomdle's user_id function to get Moodle's user ID and stores it wherever you want. This would have the benefit of not needing to have data sync from Moodle to Joomla.

Please Log in or Create an account to join the conversation.