Extension:SocialProfile/Hooks/BasicProfileChanged

Category:Extension hooks#BasicProfileChanged
BasicProfileChanged
Available from version ???
Called at the end of saveProfileBasic in SpecialUpdateProfile.php, right before purging UserProfile caches and returning
Define function:
public static function onBasicProfileChanged( $user, $basicProfileData ) { ... }
Attach hook:
$wgHooks['BasicProfileChanged'][] = 'MyExtensionHooks::onBasicProfileChanged';
Called from:File(s): Category:Extension hooks provided by SocialProfileSocialProfile / UserProfile/includes/specials/SpecialUpdateProfile.php
Function(s): saveProfileBasic

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:BasicProfileChanged extensions.

The BasicProfileChanged hook is called at the end of saveProfileBasic in SpecialUpdateProfile.php, right before purging UserProfile caches and returning. It has access to the UserIdentity object ($user) representing the person whose profile data was updated, and the new data ($basicProfileData).

The "administrative" version of the Special:UpdateProfile page, Special:EditProfile, which admins and/or other privileged users can use to change other users' social profiles to e.g. remove offensive content or spam etc. does not run this hook, only the Special:UpdateProfile page runs this hook.

This hook was originally added in April 2011 for interoperability with the long-bitrotten and subsequently archived Sematic Social Profile extension.

Category:Extension hooks Category:Extension hooks provided by SocialProfile