diff --git a/hook.php b/hook.php index ba770f7..cc64124 100644 --- a/hook.php +++ b/hook.php @@ -666,4 +666,29 @@ function plugin_example_postinit() { // do something } } + + +/** + * Hook to add more data from ldap + * fields from plugin_retrieve_more_field_from_ldap_example + * + * @param $datas array + * + * @return un tableau + **/ +function plugin_retrieve_more_data_from_ldap_example(array $datas) { + return $datas; +} + + +/** + * Hook to add more fields from LDAP + * + * @param $fields array + * + * @return un tableau + **/ +function plugin_retrieve_more_field_from_ldap_example($fields) { + return $fields; +} ?> \ No newline at end of file diff --git a/setup.php b/setup.php index 23df910..d71ef92 100755 --- a/setup.php +++ b/setup.php @@ -148,6 +148,9 @@ function plugin_init_example() { $PLUGIN_HOOKS['add_javascript']['example'] = 'example.js'; $PLUGIN_HOOKS['add_css']['example'] = 'example.css'; + // request more attributes from ldap + //$PLUGIN_HOOKS['retrieve_more_field_from_ldap']['example']="plugin_retrieve_more_field_from_ldap_example"; + // Retrieve others datas from LDAP //$PLUGIN_HOOKS['retrieve_more_data_from_ldap']['example']="plugin_retrieve_more_data_from_ldap_example"; @@ -161,7 +164,7 @@ function plugin_init_example() { $PLUGIN_HOOKS['post_init']['example'] = 'plugin_example_postinit'; - // CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm(); + // CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm(); $PLUGIN_HOOKS['csrf_compliant']['example'] = true; }