Helpful Information
 
 
Category: vBulletin 3 Articles
[How-To] Deal with User deletion/pruning and Username Changes

If your Hack keeps user dependant Data (in it's own tables), you should code Plugins for the following Hooks to react on Events where this Data does change, eg. when Users get deleted or their Username changed.
Otherwise you might end up with invalid data or data for users that don't even exist anymore

Hook userdata_delete
This Hook will be called when a single Users gets deleted.
The Userid is $this->existing['userid']

Hook useradmin_prune
This Hook will be called when Users are being mass-pruned
The affected Userids are $userids, which is a comma-separated string of User-IDs.

Hook userdata_update_username
This Hook is called when the Username of a User is being changed.
$userid is the UserID, $username the new Username and $this->existing['username'] is the old Username.

Please note that the two userdata Hooks are within the User Data Manager, whichj means that $vbulletin and $db as well as all other global variables are not within the scope and you have to use $this->registry and $this->dbobject (or $this->registry->db) instead.










privacy (GDPR)