OnGetUserInfo

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"