delete_user

动作钩子
do_action( 'delete_user', $id, $reassign, $user )
参数
  • (int) $id ID of the user to delete.
    Required:
  • (int|null) $reassign ID of the user to reassign posts and links to. Default null, for no reassignment.
    Required:
  • (WP_User) $user WP_User object of the user to delete.
    Required:
定义位置
相关勾子
deleted_userdelete_termwpmu_delete_userrest_delete_userdelete_user_form
相关方法
wp_delete_userdelete_usermetawpmu_delete_userdelete_user_metadelete_user_optiondelete_meta
引入
5.5.0
弃用
-

delete_user: 这个函数用来删除一个WordPress用户。它通常用于删除一个不再需要的用户。

在一个用户从数据库中被删除之前立即触发。

do_action( 'delete_user', $id, $reassign, $user );

常见问题

FAQs
查看更多 >