Description

This event trigger when getting current logined user info by field code (e.g. FIELD_GENDER, FIELD_BIRTHDATE, etc). The plugin may manipulate the obtained field value provided extended user info configuration is enabled.


Params

An array with two items; fieldcode and fieldvalue.

{code}
Array
(
[0] => FIELD_GENDER,
[1] => Male (corresponding value of the fieldcode passed by reference)
)
{/code}

Examples

{code}
function onGetUserInfo( $arrItems ) 
{
$arrGenderShortForm = array('male' => 'M', 'female' => 'F');

$arrItems[1] = $arrGenderShortForm[$arrItems[1]];
 
return true;
}

Result:
Field Value changed from "Male" to "M"
{/code}

Description

This event will be triggered when the profile is being updated; successfully or not.


Params

An array with two items; user id and true (success)/false (fail) on profile update operation.

{code}
Array
(
[0] => 1,
[1] => true
)
{/code}

Examples

{code}

function
onAfterProfileUpdate( $arrItems )
{
if ($arrItems[1])
{
/* perform your update success handler here */
}
else
{
/* perform your update failed handler here */
}

}
{/code}

Description

This event will be triggered when the user details is being updated successfully.


Params

An array with one item; the user class object.

{code}
Array
(
[0] => $objUser
)
{/code}

Examples

{code}

function
onUserDetailsUpdate( $arrItems )
{
/* perform your user detail update success handler here */
}
{/code}

Description

This event will be triggered before the profile update operation is performed. The plugin can decide whether to proceed with the profile update operation by returning true (proceed)/false (stop).


Params

An array with two items, user id and an array of available fieldcodes as array index pointing to the corresponding field value.

{code}
Array
(
[0] => 1,
[1] => Array (
'FIELD_GENDER' => 'Male',
'FIELD_BIRTHDATE' => '',
.
.
.
)
{/code}

Return

boolean (true/false)


Examples

{code}

function
onBeforeProfileUpdate( $arrItems )
{
/*
* perform your required pre-requisite handler here
* return true if you want the profile to continue the update operation
* return false to stop the update operation
*/
}
{/code}

Description

This event will be triggered when the avatar is being updated; successfully or not. The plugin may make use of the image file path obtained from the parameters.


Params

An array with three items; user id, avatar's old file path and avatar's new file path.

{code}
Array
(
[0] => 1,
[1] => '', /* old file path*/
[2] => '' /* new file path*/
)
{/code}

Examples

{code}

function
onProfileAvatarUpdate( $arrItems )
{
/* perform your avatar file path manipulation handler here */
}
{/code}

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW