Yannick Warnier ebc4d137fb Update Create Drupal User plugin's documentation 8 年 前
..
lang 57ac01ffcb Register drupal_user_id extra field - refs BT#9413 9 年 前
src e5d4edd940 Fix firstname/lastname update see BT#10808 8 年 前
README.md ebc4d137fb Update Create Drupal User plugin's documentation 8 年 前
config.php d2c5712a06 Remove the require statement to classes - refs BT#9083 9 年 前
index.php 40f012b0fa Create plugin to crete a Drupal user - refs BT#9083 9 年 前
install.php 40f012b0fa Create plugin to crete a Drupal user - refs BT#9083 9 年 前
plugin.php 40f012b0fa Create plugin to crete a Drupal user - refs BT#9083 9 年 前
readme.txt ef081693d3 Minor - Add Readme files - refs BT#9083 9 年 前
uninstall.php 40f012b0fa Create plugin to crete a Drupal user - refs BT#9083 9 年 前

README.md

Create Drupal user plugin

This plugin creates a user on a Drupal portal when a user is registered in Chamilo.

This uses the Hook mechanism available to Chamilo plugins: when enabling this plugin, the HookCreateDrupalUser is automatically added to the hooks stack, and the UserManager::create_user() method calls the HookCreateUser hook and notifies it, resulting in the plugin code to be executed.

The Drupal portal settings must be configured in the configuration panel for the plugin. A SOAP call is then initiated inside the plugin code, that will use the Drupal's addUser() web service. See src/HookCreateDrupalUser.php for more info on the call parameters.

After calling the web service and receiving a positive answer, Chamilo stores the remote (Drupal) user ID inside the extra_field_values table, as field name "drupal_user_id". This later serves for updates and other synchronisation purposes.

Extending

Other plugins could easily be created by copying this one and modifying the class names and web services to call. Simply review every variable coined with the "drupal" name and update according to your own portal.