The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Ask about the hook!
Hi All!
I have written a products that manage my mark's member. I have a question about the plugin to delete user's mark when delete user in admincp. What's hook can I use? Sorry for my english isn't good. Please help me. Thanks in advance. |
#2
|
||||
|
||||
I can't really tell what you are talking about. But, when you delete a user via the admin cp, you are using the admincp/user.php file and there is a hook called 'useradmin_prune' that I use for when I delete members and have to do more stuff afterwards.
|
#3
|
|||
|
|||
Hi!
Thank you for your help, I want to write a plugin in my product to delete member's mark in usermarks table. Now I have known hook name. Thank in advance. |
#4
|
||||
|
||||
There is no "usermarks" table in a default installation in vBulletin.
|
#5
|
|||
|
|||
Hi!
usermarks is my table that I add it to my db, I write new product work with it. Each member have some record in it, and I want to delete that records, I know that I must write plugin, please tell me how? Thanks in advance.! |
#6
|
||||
|
||||
Quote:
PHP Code:
|
#7
|
|||
|
|||
Hi!
I add new plugin at useradmin_prune hook by add some code: $db->query_write("DELETE FROM ".TABLE_PREFIX"usermarks WHERE userid in ($userids) Now I go to my admincp then delete user but records in usermarks have existed. How to delete it? Thanks you very much! |
#8
|
||||
|
||||
Whoops. Mine removes the user when you do a Mass Delete. You are looking to delete a single user from the admin cp, right? If so, you can't use a plugin, you actually have to modify the code under the 'kill' option. Go to around line 277 or so of admincp/user.php. Look for this code and add your query in where I have mine in red:
Code:
$userdm =& datamanager_init('User', $vbulletin, ERRTYPE_CP); $userdm->set_existing($info); $userdm->delete(); unset($userdm); $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "users WHERE id=" . $vbulletin->GPC['userid'] . ""); define('CP_REDIRECT', 'user.php?do=modify'); print_stop_message('deleted_user_successfully'); |
#9
|
|||
|
|||
Hi Lynne!
I don't want to modify orginal vbb code. I want to add a hack mod to delete it. Is there another way? Can I use another hook to delete data without join with user table. Example in global_start? Thank in advance. Merry Christmas & Happy new year! |
#10
|
||||
|
||||
There should be a hook called userdata_delete.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|