wordpress忘记账户_如何允许用户删除其WordPress帐户

wordpress忘记账户

Do you want to allow users to delete their own WordPress accounts? If you allow user registration on your WordPress site, and a user does not want to keep their account anymore, then they will have to manually ask you to delete their account. In this article, we will show you how to allow users to delete their WordPress account from their account area.

是否要允许用户删除自己的WordPress帐户? 如果您允许用户在WordPress网站上注册,并且用户不想再保留其帐户,那么他们将不得不手动要求您删除其帐户。 在本文中,我们将向您展示如何允许用户从其帐户区域删除其WordPress帐户。

Allow users to delete their accounts in WordPress
为什么允许用户在WordPress中自行注销? (Why Allow Users to Unregister Themselves in WordPress?)

Many WordPress websites allow users to register and login. This could be membership websites, blogs that accept user submitted posts, or an online store.

许多WordPress网站允许用户注册和登录 。 这可能是会员网站接受用户提交的帖子的博客或在线商店

Once users register their WordPress account, they cannot delete it on their own. They will have to manually ask you through a contact form to delete their information.

用户一旦注册了WordPress帐户,便无法自行删除它。 他们将不得不通过联系表格手动要求您删除其信息。

Website owners may want to keep the user contributed content or at least have their email address. However, if you give users control of their information, then they may feel more confident in their interactions on your website.

网站所有者可能希望保留用户提供的内容或至少拥有其电子邮件地址。 但是,如果您让用户控制他们的信息,那么他们可能会对他们在您网站上的互动充满信心。

That being said, let’s see how to easily allow users to unregister themselves in WordPress and delete their WordPress account information completely.

话虽如此,让我们看看如何轻松地允许用户在WordPress中注销自己并完全删除其WordPress帐户信息。

允许用户删除其WordPress帐户 (Allowing Users to Delete their WordPress Accounts)

First thing you need to do is install and activate the Delete Me plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活Delete Me插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to visit the Settings » Delete Me page in your WordPress admin area to configure plugin settings.

激活后,您需要访问WordPress管理区域中的“设置”»“删除我”页面以配置插件设置。

Delete Me settings

First you want to select the user roles that can delete their own profiles. You can also choose link styling and text that they will see on their profile page.

首先,您要选择可以删除自己的配置文件的用户角色 。 您还可以选择链接样式和他们将在其个人资料页面上看到的文本。

By default once the account is deleted, the plugin will redirect users to your site’s homepage. However, you can change that and provide a custom URL for redirect such as a thank you page. Additionally, you can choose to delete user comments as well.

默认情况下,删除帐户后,该插件会将用户重定向到您网站的首页。 但是,您可以更改它并提供用于重定向的自定义URL,例如“谢谢”页面。 此外,您还可以选择删除用户评论。

Don’t forget to click on the save changes button to store your settings.

不要忘记单击“保存更改”按钮来存储您的设置。

Now you will need to switch to a user account under the user roles you selected earlier. Once logged in, go ahead and visit the Profile page, and you will see a new section where users can click to delete their account.

现在,您将需要切换到先前选择的用户角色下的用户帐户。 登录后,继续并访问“ 个人资料”页面,您将看到一个新部分,用户可以单击该部分以删除其帐户。

Delete account link on user profile page

When a user clicks on the link, they will be shown a warning that deleting an account will delete their access and all their content. Once the user agrees, this plugin will proceed and delete their account.

当用户单击链接时,将向他们显示警告,删除帐户将删除其访问权限及其所有内容。 一旦用户同意,该插件将继续执行并删除其帐户。

将删除帐户链接添加到自定义用户配置文件页面 (Adding Delete Account Link to Custom User Profile Page)

If you use a custom user profile page, then this is how you can allow users to delete their WordPress account.

如果您使用自定义用户个人资料页面 ,那么这就是允许用户删除其WordPress帐户的方式。

Simply add the following shortcode to your custom profile page template:

只需将以下简码添加到您的自定义配置文件页面模板中:

[plugin_delete_me]Delete Your Account[/plugin_delete_me]

[plugin_delete_me]Delete Your Account[/plugin_delete_me]

Note: When a user deletes their account, it will also delete all their content (posts, pages, custom post types) and move it to trash.

注意:用户删除帐户时,还将删除其所有内容(帖子,页面,自定义帖子类型)并将其移至回收站

A user can re-register a new account using the same email address, but this will not recover the content they contributed earlier. However, as a site administrator, you can recover content from trash if it is not permanently deleted.

用户可以使用相同的电子邮件地址重新注册一个新帐户,但这将无法恢复他们之前贡献的内容。 但是,作为站点管理员,如果垃圾内容没有被永久删除,则可以从其中恢复内容。

We hope this article helped you learn how to allow users to unregister in WordPress. You may also want to see our step by step WordPress security guide for beginners.

我们希望本文能帮助您学习如何允许用户在WordPress中注销。 您可能还希望查看针对初学者的逐步WordPress安全指南

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-allow-users-to-delete-their-wordpress-accounts/

wordpress忘记账户

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值