Does anyone has any experience with it?
I've found nothing, neither in the readme.txt, nor online. Am I missing something?
Filippo
What readme?
Hi Filippo!
Are you trying to use data manipulation hook?
yep!
In readme.txt you can find an example at line 206.
BTW you need to create a PHP file where you need to use array $result.
For example if you want to set department field you need to use $result["department"] ='Something' or you can use shibboleth attribute in this way $address = $_SERVER[$this->config->field_map_address];
If you explain more in detail what you want to do I can try to help you.
If you want to use custom fields you can't use $user->profile_field_building='something' because you can use only user fields.
You can try this solution:
$fieldid = $DB->get_field('user_info_field', 'id', array('shortname' => 'matricola'));
if (isset($fieldid)) {
$info = $DB->get_record('user_info_data', array("userid" => $user->id, "fieldid" => $fieldid));
if ($info) {
$info->data = $matr;
$DB->update_record('user_info_data', $info, false);
} else {
$record = new stdClass();
$record->userid = $user->id;
$record->fieldid = $fieldid;
$record->data = $matr;
$id = $DB->insert_record('user_info_data', $record, true);
}
}
I hope it will help you!
Thanks!
I'll look into it right away