Joomdle don't create user's Joomla account (external DB)

  • vanoir
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 6 months ago #1 by vanoir
Hello,

As the title describes joomdle is not "auto" creating users joomla account, the "moodle account" and "joomdle user" tabs are checked as green, everything seems to be right but the user is not registered in joomla.

The issue may be that the users are being registered in moodle through the external DB plugin nevertheless if manually add the user to joomla with joomdle everything works fine.

i'm open for workarounds, thanks

Considerations:
using the last version of moodle, joomdle and joomla
I have the "Sync users to Joomla" enable
The users authentication method is "joomdle"
System check is all green
Everything else works fine

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

More
13 years 6 months ago #2 by Antonio Durán
Try creating a normal user in moodle, setting his auth method to joomdle, to see if he gets created in joomla.

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

  • vanoir
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 6 months ago #3 by vanoir
Hi Antonio,

I created a normal user in moodle with "Site administration -> Users -> Accounts -> Add a new user" and yes, it works, joomla user created and activated

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

More
13 years 6 months ago #4 by Antonio Durán
I have not tried the external db auth plugin, but I guess it is not triggering the user creation events, which are the ones that make Joomdle create new users in Joomla.

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

  • vanoir
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 6 months ago #5 by vanoir
I see, it was my first thought. Unfortunately i'm not used to code moodle plugins and joomla components,can you give me some tips on where to look so i can get it working? some workaround maybe, thanks

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

More
13 years 6 months ago #6 by Antonio Durán
If you don't have some knowledge of Moodle internals, it could be difficult to debug.

I think basically you will need to insert this:
Code:
events_trigger('user_created', $user);

in the right place in db auth plugin. I took a quick look at it and it may be in line ~375, after:
Code:
$user->timemodified = $user->timecreated; $id = $DB->insert_record ('user', $user); // it is truly a new user

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