Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

[Closed] Moodle cannot delete user from joomla

More
11 years 9 months ago - 11 years 3 months ago #11 by Antonio Durán
Replied by Antonio Durán on topic [Closed] Moodle cannot delete user from joomla
We don't really have a pre-defined release plan, so versions are released when we have some new features or when there is some important bug/incompatibility.

Right now, being summer, I don't think a new version will be ready until late August at least.
Last edit: 11 years 3 months ago by Antonio Durán.
The topic has been locked.
More
11 years 8 months ago - 11 years 8 months ago #12 by Antonio Durán
Replied by Antonio Durán on topic Moodle cannot delete user from joomla
I looked into this, and maybe you can apply the changes yourself, as they are easy.

File to modify: moodle/auth/joomdle/auth.pjp

Look for this code (in process_config function):
Code:
$conditions = array ('eventname' => 'user_updated', 'component' => 'joomdle'); if (!$DB->record_exists ('events_handlers', $conditions)) { $event = 'user_updated'; $handler->eventname = $event; $handler->handlermodule = 'auth/joomdle'; $handler->component = 'joomdle'; $handler->handlerfunction = serialize ('joomdle_'.$event); $handler->schedule = 'instant'; $handler->status = 0; $DB->insert_record ('events_handlers', $handler); }
And add this just after it:
Code:
$conditions = array ('eventname' => 'user_deleted', 'component' => 'joomdle'); if (!$DB->record_exists ('events_handlers', $conditions)) { $event = 'user_deleted'; $handler->eventname = $event; $handler->handlermodule = 'auth/joomdle'; $handler->component = 'joomdle'; $handler->handlerfunction = serialize ('joomdle_'.$event); $handler->schedule = 'instant'; $handler->status = 0; $DB->insert_record ('events_handlers', $handler); }

Then look for joomdle_user_created function, and after it, add:
Code:
function joomdle_user_deleted ($user) { global $CFG, $DB; if ($user->auth != 'joomdle') return true; $auth_joomdle = new auth_plugin_joomdle (); $auth_joomdle->call_method ("deleteUser", $user->username); return true; }

You will need to save configuration again in joomdle plugin in Moodle, before it works.
Last edit: 11 years 8 months ago by Antonio Durán.
The topic has been locked.
More
11 years 3 months ago #13 by Antonio Durán
Replied by Antonio Durán on topic Moodle cannot delete user from joomla
Added in 1.0
The topic has been locked.