Notifications
Clear all

[Solved] How to disable delete account button for users?

4 Posts
3 Users
3 Reactions
415 Views
Posts: 52
Topic starter
(@novedddd)
Estimable Member
Joined: 3 years ago

We just had a user today who chose to click the "delete account" button from their profile, which resulted in their entire account being deleted. They now regret doing it, and it seems there's nothing I can do since their entire account was deleted without my knowledge as Admin. I honestly had no idea that this was even turned on by default for users. I think this shouldn't be turned on by default for users, for this very reason. I can't seem to find anything in the settings to disable this. What's the best way to do this?

3 Replies
Sofy
Posts: 4802
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hello,

You can use the CSS code below: 

 #wpforo #wpforo-wrap .wpforo-profile .wpforo-user-tools span.wpf-ab-delete {display:none}

 

Insert the code in the Custom CSS code textarea located in the following tab: 

For the Single Board Forum:

  • Dashboard > wpForo > Settings > Colors & Styles

Multi-Boards Forum:

  • Dashboard > [Your Board Name] > Settings > Colors & Styles tab
  • Dashboard > [Your Board Name> Settings > Colors & Styles tab

For example:

  • Dashboard > EN Forum > Settings > Colors & Styles tab
  • Dashboard > FR Forum > Settings > Colors & Styles tab
1 Reply
(@novedddd)
Joined: 3 years ago

Estimable Member
Posts: 52

Posted by: @sofy

Hello,

You can use the CSS code below: 

 #wpforo #wpforo-wrap .wpforo-profile .wpforo-user-tools span.wpf-ab-delete {display:none}

 

Insert the code in the Custom CSS code textarea located in the following tab: 

For the Single Board Forum:

  • Dashboard > wpForo > Settings > Colors & Styles

Multi-Boards Forum:

  • Dashboard > [Your Board Name] > Settings > Colors & Styles tab
  • Dashboard > [Your Board Name> Settings > Colors & Styles tab

For example:

  • Dashboard > EN Forum > Settings > Colors & Styles tab
  • Dashboard > FR Forum > Settings > Colors & Styles tab

 

Thank you, I actually ended up using css before I created this post, so, my concern is why is CSS is the only option for something this important? If you consider nearly every other forum or social plugin, very few, if any allow users to delete their own account by default. Shouldn't this be a toggle somewhere within the admin area?

 

Posts: 992
Moderator
(@martin)
Support Team
Joined: 8 years ago

Hi @novedddd,

You can also disable the Delete Own Account button using this hook code in Code Snippets plugin or directly in your child theme's functions.php file:

add_filter('wpforo_can_user_self_delete', '__return_false' );