WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#34615 new feature request

Make it possible to disable a user account

Reported by: thomaswm Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:
PR Number:

Description

There should be a possibility to flag a user account as "disabled". A disabled user should

  1. not be able to log in to WordPress anymore, and
  2. not receive any email notifications (e.g. comment notifications) anymore, but
  3. all the posts he wrote should still be assigned to him.

This is useful in the case that an author or editor of a WordPress blog leaves the company and they would like to delete his user account. However, if they did, they'd have to delete all his posts or assign them to another user.

This blog post lists some possible workarounds, but none of them satisfies all three requirements stated above.

Change History (8)

#1 @jeremyfelt
4 years ago

A more defined concept of "user status" could help with this. #34316

#2 @webdados
3 years ago

I think this is a must.

#3 follow-up: @lukecavanagh
3 years ago

@thomaswm

So use user_status and include a status for disabled?

Is user_status still used?
https://wordpress.org/support/topic/what-is-the-status-of-user_status/

#4 in reply to: ↑ 3 @webdados
3 years ago

Replying to lukecavanagh:

@thomaswm

So use user_status and include a status for disabled?

Is user_status still used?
https://wordpress.org/support/topic/what-is-the-status-of-user_status/

I wouldn't mix user_status and enabled/disabled.

I would create a new simple "enabled/disabled" field.

#5 follow-up: @lukecavanagh
3 years ago

@webdados

So just a new user meta field then.

#6 in reply to: ↑ 5 @webdados
3 years ago

Replying to lukecavanagh:

@webdados

So just a new user meta field then.

Because I think this is something at the username/password level of importance*, I would suggest a new field on the PREFIX_users table, but a new user meta field would do it also.

  • The reason I think this is on the same level of importance is because, if this gets implements, a successful login attempt will be dependable on these 3 fields: user_login, user_pass and the new "enabled/disabled" or "active/inactive" or "whatever it's call" field.

#7 follow-up: @lukecavanagh
3 years ago

@webdados

Granted it would be quicker in a field of the users DB table, but if going back to the user table, why not use user_status since it still exists in the users table, just not used.

#8 in reply to: ↑ 7 @webdados
3 years ago

Replying to lukecavanagh:

Because this had another use in the past, and may have another one in the future.

Maybe some plugins exist that interact with this field already.

Note: See TracTickets for help on using tickets.