Sinisakrisan (Talk | contribs) (Created page with "===Description=== This event trigger when getting current logged in user info by field code (e.g. FIELD_GENDER, FIELD_BIRTHDATE, etc). The plugin may manipulate the obtained f...") |
Sinisakrisan (Talk | contribs) (→Example) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
===Description=== | ===Description=== | ||
− | This event | + | This event is triggered when getting current logged-in user info by field code (e.g. FIELD_GENDER, FIELD_BIRTHDATE, etc). The plugin may manipulate the obtained field value provided that the extended user info configuration is enabled. |
===Params=== | ===Params=== | ||
Line 24: | Line 24: | ||
return true; | return true; | ||
} | } | ||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<br /> | <br /> | ||
+ | Result: | ||
+ | Field Value changed from "Male" to "M" |
Latest revision as of 10:36, 15 October 2013
Description
This event is triggered when getting current logged-in user info by field code (e.g. FIELD_GENDER, FIELD_BIRTHDATE, etc). The plugin may manipulate the obtained field value provided that the extended user info configuration is enabled.
Params
An array with two items; fieldcode and fieldvalue.
Array ( [0] => FIELD_GENDER, [1] => Male (corresponding value of the fieldcode passed by reference) )
Example
function onGetUserInfo( $arrItems ) { $arrGenderShortForm = array('male' => 'M', 'female' => 'F'); $arrItems[1] = $arrGenderShortForm[$arrItems[1]]; return true; }
Result:
Field Value changed from "Male" to "M"