Replies: 3 comments 1 reply
-
Your code looks valid. Here is an example from iemail.inc.t: |
Beta Was this translation helpful? Give feedback.
-
A patch would help a lot! |
Beta Was this translation helpful? Give feedback.
-
Patch committed as per 3c85826 Note that I've changed 'CHANGE_OF_ADDRESS' to ''EMAIL_CHANGED'. PS: Documentation also updated @ https://github.com/fudforum/FUDforum/wiki/Plugins |
Beta Was this translation helpful? Give feedback.
-
In the documentation wiki there is a set of plugin hooks currently provided and a note that further hooks can be added.
I propose adding four hooks. Below is a brief description of each. Note that three pass an array of arguments with named indices; if there is a preferred/canonical way to pass multiple arguments to plugin_call_hook(), please advise. Let me know what else (patches?) you need, as well as any comments or questions.
'GROUP_JOIN'
This hook is placed in groupmgr.php.t just after adding a new record to the group_members table.
plugin_call_hook('GROUP_JOIN', array('uid'=>$usr_id, 'gid'=>$group_id));
'GROUP_LEAVE'
This hook is placed in grp_delete_member() in groups.inc.t.
plugin_call_hook('GROUP_LEAVE', array('uid'=>$user_id, 'gid'=>$id));
'CHANGE_OF_ADDRESS'
This hook is placed in register.php.t and executed when a user changes their email address.
plugin_call_hook('CHANGE_OF_ADDRESS', array('uid'=>$uid, 'old_email'=>$old_email, 'new_email'=>$uent->email));
'ACCOUNT_DELETE'
This hook is placed in admuser.php after an administrator has confirmed the deletion of an account, but just before the call to usr_delete().
plugin_call_hook('ACCOUNT_DELETE', $usr_id) ;
Beta Was this translation helpful? Give feedback.
All reactions