delete_user
action involves two parameters:$id
and$reassign
. So you should specify two parameters for the hook.- Because
sanitize_term()
andsanitize_user()
use different ways to sanitize strings,'tips_' . $_POST['user_login']
and'tips_' . $user_obj->user_login
are not always the same string. So it’s better to use'tips_' . sanitize_user($_POST['user_login')
as term name when inserting the term.