Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[com_users] Add trash or change confirm when delete user #20049

Closed
Septdir opened this issue Apr 1, 2018 · 14 comments
Closed

[com_users] Add trash or change confirm when delete user #20049

Septdir opened this issue Apr 1, 2018 · 14 comments

Comments

@Septdir
Copy link
Contributor

Septdir commented Apr 1, 2018

I will not write a long introduction but just give examples
Please take a closer look at the timestamps

03:00 Automatic server backup
15:00 New user registered. Let's call it Mike
18:00 The administrator mistakenly deletes Mike

In this situation, it is almost impossible to restore the user.

Of course this is entirely the fault of the administrator.
You can prevent administrators from deleting users.
You can only delete them after you create a backup
But no one is immune from mistakes.

Therefore, I add state trash or confirm message.
It is clear that adding to the state is quite problematic, need change database table, rewrite the user's rights, etc.
However, just adding a popup / modal / confirm window with usernames to control panel template is quite simple.

Popup / Modal window will be preferable because they are better seen, unlike the standard confirm

@Quy
Copy link
Contributor

Quy commented Apr 4, 2018

I get an alert/warning before deletion:
Are you sure you want to delete? Confirming will permanently delete the selected item(s)!

@Septdir
Copy link
Contributor Author

Septdir commented Apr 4, 2018

@Quy I also have this message, however, it does not specify who exactly you delete.
I change first message and title

P.S In truth, seeing such a message does not stop to think about action

@Septdir Septdir changed the title [com_users] Add trash or confirm when delete user [com_users] Add trash or change confirm when delete user Apr 4, 2018
@tonypartridge
Copy link
Contributor

We can easily chuck in the user name with sprintf. But it’s not really soling the issue you had.

I suppose you could add a trash system but this is quite a lot of work for users given it’s usage.

@tonypartridge
Copy link
Contributor

I’d probably recommend you re-train your admins not to delete users and instead to block them and purge ones without activity that are blocked after x months.

@Quy
Copy link
Contributor

Quy commented Apr 6, 2018

Take it one step further to hide the Delete button with css and unhide when ready to delete.

@Septdir
Copy link
Contributor Author

Septdir commented Apr 6, 2018

@Quy Well, on their sites I'll figure out how to be. But I think that this problem happens not only for me

@tonypartridge
Copy link
Contributor

tonypartridge commented Apr 6, 2018 via email

@Septdir
Copy link
Contributor Author

Septdir commented Apr 6, 2018

@tonypartridge You are undoubtedly right that people need to be trained and trained, but this is not stahovka from mistakes. For example, do you delete several users, how to check before deleting?

With GDPR coming in, trashing users for instance will be even more frowned upon since when you want to delete a user they should be deleted.

In com_content, com_categories, com_menu .. have trashed in com_users permanent delete.
Long time working with content a person gets used to the fact that he can always be restored from trashed and often does not think about the fact that in com_users permanent delete.

Hmm .. can be allowed to delete only blocked I guess I'll do it on my site

@Septdir
Copy link
Contributor Author

Septdir commented Apr 10, 2018

On my sites I did so

  • IF filter.state != 1 Remove users.delete & users.unblock ELSE remove users.block
  • IF filter.active!= 1 Remove users.activate

Maybe later I'll correct model to change the query to the database

@Septdir
Copy link
Contributor Author

Septdir commented Apr 11, 2018

If such an idea with buttons is interesting then I can do PR on next week

@Quy
Copy link
Contributor

Quy commented May 11, 2018

@Septdir Please submit a PR. Thanks.

@Septdir
Copy link
Contributor Author

Septdir commented May 11, 2018

@Quy done

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/20049

@Quy
Copy link
Contributor

Quy commented May 11, 2018

See PR #20348


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants