function getSubstitution() { $subs = array(); $aclman =& Docebo::user()->getAclManager(); $user = $aclman->getUser($this->id_user, false); $subs['[display_name]'] = $user[ACL_INFO_LASTNAME] . $user[ACL_INFO_FIRSTNAME] ? $user[ACL_INFO_LASTNAME] . ' ' . $user[ACL_INFO_FIRSTNAME] : $aclman->relativeId($user[ACL_INFO_USERID]); $subs['[username]'] = $aclman->relativeId($user[ACL_INFO_USERID]); $subs['[firstname]'] = $user[ACL_INFO_FIRSTNAME]; $subs['[lastname]'] = $user[ACL_INFO_LASTNAME]; //variable fields require_once $GLOBALS['where_framework'] . '/lib/lib.field.php'; $temp = new FieldList(); $fields = $temp->getFlatAllFields(); foreach ($fields as $key => $value) { $subs['[userfield_' . $key . ']'] = $temp->showFieldForUser($this->id_user, $key); } return $subs; }