Jump to content

Trash rather than delete users?


Robin S
 Share

Recommended Posts

Users are pages, but for some reason unlike other pages it seems that they skip the trash and are permanently deleted.

Is there some trick to allow users to be trashed rather than deleted? I need to give an editor role the ability to remove users but sometimes they "change their mind" and want to recover a user that they previously deleted.

  • Like 1
Link to comment
Share on other sites

If you enable $config->advanced you can have a look at the system tab in each of your templates. There you can prevent pages of a template to be trashable. But I'd be cautious with enabling the trash for the user template as you might find issues with trashed users not behaving exactly like non-existing ones.

  • Like 2
Link to comment
Share on other sites

35 minutes ago, LostKobrakai said:

If you enable $config->advanced you can have a look at the system tab in each of your templates. There you can prevent pages of a template to be trashable.

Thanks - I wasn't aware of that system tab before.

I'm sure Ryan must have had a reason for disabling the trashing of user pages by default but in testing so far it seems okay. I had to uncheck the "Don't allow pages to be moved" option for the user template too in order to allow trashed users to be restored.

  • Like 3
Link to comment
Share on other sites

  • 2 years later...
On 1/26/2017 at 12:58 AM, Robin S said:

I had to uncheck the "Don't allow pages to be moved" option for the user template too in order to allow trashed users to be restored.

It doesn't seem like this is necessary anymore - not sure if the change happened on this update: https://processwire.com/blog/posts/processwire-3.0.107-core-updates/

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...