Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
[How-To] Deal with User deletion/pruning and Username Changes
Andreas
Join Date: Jan 2004
Posts: 6,863

Germany
by Andreas Andreas is offline 29 Sep 2005

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.
Views: 3095
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Moderators Functions PM User on Thread Deletion toonysnn Modification Graveyard 29 02 Oct 2008 11:08
Restrict Pruning And Forum Deletion By Userid N9ne vBulletin 2.x Full Releases 9 10 Mar 2003 07:27



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:39.

Layout Options | Width: Wide Color: