admin管理员组文章数量:1305459
I am writing custom code to allow users of my site delete their own accounts from the front-end (i.e., they do not have to logon to the WordPress admin area to perform certain actions, but rather I created front-end pages that allow the users to do some basic operations, including deleting their own accounts).
Now, this is a multi-site network and the function to delete a user account is wpmu_delete_user($user_id)
. This call will completely purge the user account and remove it from the database.
When I inspected the wp_users
table, I found the following columns that I think are interesting and will help me in completing the front-end actions I am trying to create. Those columns are, user_activation_key
, user_status
, spam
, and deleted
.
Now, I can use those leberally by writing directly to the database via $wpdb
, but I have the following questions
Are there any specific WordPress methods or functions that allow me to interact with those four columns? How does WordPress interact with those columns?
What are the expected values for
user_status
?How can I set a user as
deleted
orspam
via a method?If I set a user as either
deleted
orspamn
, what is the effect on WordPress? Would that user be able to be used? Can the user make posts? Can the user comment? Can the user even log in?Why is there a
deleted
column. Deleting a user completely removes it from the database, so what's the purpose of this column?
Thank you.
本文标签: multisiteFour columns in the wpusers table
版权声明:本文标题:multisite - Four columns in the wp_users table 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741805185a2398459.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论