Rationale: Similar to the user_add hook, but fired only when the user gets (re-)activated. This is handy when you want to be informed only when a real user is added.
Placement: includes/functions_user.php inside user_add and user_active_flip:
Parameters: Not sure, I'm currently only using user_id, but I guess it would be good to pass $sql_ary
In fact for the event in user_add, we could as well use the user_add hook and test if the user is active.
However, the user_add is obviously not appropriate inside the user_active_flip function, hence my request for a seperate event, fired in both cases.
Note that in user_active_flip, I currently execute my logic following this:
Code: Select all
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user_id;
$db->sql_query($sql);