- Posts: 2
How To / General
Bulk upload joomdle users in Moodle
- uusita
- Topic Author
- Offline
- New Member
-
Less
More
11 years 1 week ago #1
by uusita
Bulk upload joomdle users in Moodle was created by uusita
hello everyone, it seems to me it still a problem that if i bulk upload in moodle, the users password joomdle sync to joomla with a different hash string, i read about moodle's event2 api introduction in moodle's doc said that moodle will not trigger event for every user when bulk uploading users, and it seems that's why the problem is as you guys mentioned. however i wanted to figure it out how the process is. i am new to php and debugging, i might be wrong but when i step-in the bulk upload process, i do saw event trigger in moodle/admin/tool/uploaduser/index.php:
// Trigger event.
\core\event\user_updated::create_from_userid($existinguser->id)->trigger();
can you tell me when and how joomdle listens to the event and insert new user to joomla and why the password has different hash string but in manully user adding situation, the same hash string for user password field?
thx!
// Trigger event.
\core\event\user_updated::create_from_userid($existinguser->id)->trigger();
can you tell me when and how joomdle listens to the event and insert new user to joomla and why the password has different hash string but in manully user adding situation, the same hash string for user password field?
thx!
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
11 years 5 days ago #2
by Antonio Durán
Replied by Antonio Durán on topic Bulk upload joomdle users in Moodle
Hi.
I moved your post to a new topic, as the other one was very old.
I just tested in my local Moodle 2.8.5+ installation and I see the problem persists.
But more important, I see the new event2 API has broken sync for normally created accounts from Moodle (ie: not bulk).
Now the password is coming encrypted to the user_created event handler, so we cannot create the user in Joomla with the right password
I don't know if this is what they wanted, or it was a side effect of events2 changes.
I will need to study new event2 API, in case there is anything we can do to get password in the clear. I will need to port event triggers and handlers to the new event2 API anyway, so I should be able to see if there is a way to do what we want.
If there is none, I will put a bug repot on moodle.org to inform of the problem / see if I can get more info.
What version are your running? Is normal user creation working fine for you?
As for the event handler: function is joomdle_user_created in auth.php
I moved your post to a new topic, as the other one was very old.
I just tested in my local Moodle 2.8.5+ installation and I see the problem persists.
But more important, I see the new event2 API has broken sync for normally created accounts from Moodle (ie: not bulk).
Now the password is coming encrypted to the user_created event handler, so we cannot create the user in Joomla with the right password
I don't know if this is what they wanted, or it was a side effect of events2 changes.
I will need to study new event2 API, in case there is anything we can do to get password in the clear. I will need to port event triggers and handlers to the new event2 API anyway, so I should be able to see if there is a way to do what we want.
If there is none, I will put a bug repot on moodle.org to inform of the problem / see if I can get more info.
What version are your running? Is normal user creation working fine for you?
As for the event handler: function is joomdle_user_created in auth.php
Please Log in or Create an account to join the conversation.