Problem/Motivation

(Why the issue was filed, steps to reproduce the problem, etc.)

There is currently a duplication of terminology in Drupal which, in and of itself isn't confusing, however when searching for modules or help, the two become severely blurred. The term I am referring to is "Block". On one hand, we have a "Block" referring to a visual entity, as in, "He added content to the block, and placed it in the footer." However this term is also used in reference to a user, as in, "The user caused problems, and so he was blocked from the site." Spoken of in context, either instance is clear, however, just as an example, as I filled out the form for this issue, I looked at the list for "Component". There was the "User System", but there was also the "Block Module". I had to stop and think seriously about which "block" this was referring to.

Proposed resolution

(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)

As "Blocks" are well established as a visual entity within Drupal, and I believe that attempting to change this term would be, at best, extremely difficult, I believe that the best plan of action would be to modify the User related term. There are a variety. Myself, I think the term "Lock-out" or "Locked-Out" would work well in substitution. "The user was blocked from the site"/"The user was locked-out of the site." I think that this would be an easy substitution in terminology which could easily be put into place in any upcoming Drupal update.

Going hand-in-hand with this "user issue", is a User Management issue. Currently, whether a user is brand new, and hasn't yet been approved by an Administrator, or the user is a troublemaker who has had their privileges suspended, they are shown as "Blocked". This can be difficult for the Administrator if they have a number of user accounts falling under this category. For example, I have several sites where spammers are creating bogus accounts with user names like "lklnspdiw1966". After looking into this matter, I choose not to cancel these obviously fake accounts, so that the e-mail address cannot be reused. The issue however becomes that I have large numbers of "fake" accounts which I leave as "blocked". However it quickly becomes easy for a legitimate new user to become mixed in with these fakes, and be overlooked. The solution that I would suggest is implementing an additional role status, "Pending", which a NEW user would be placed into. Having the TWO roles would allow me to look over my user list, as i do, and any "fake" accounts could be selected as a group and switched to "Locked-Out" status, while any legitimate users would be processed/approved. Ideally there would also be a switch in the "People" list, where in one position it would show ALL uses, while in the other, it would hide the "locked-out" users.

Yes, I realize that I can already create an additional role myself, however when I attempted to create a "Locked-Out" role, it wants to still grant some basic privileges, similar to the Anonymous user. My desire is to have a second category with NO PRIVILEGES, like the current "Blocked" status.

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)

Change the current "Blocked" user status in CORE to "Pending", and add an additional user status role "Locked-Out", which has NO privileges, also add a switch on the Administration User Screen, which toggles the visibility of the "Locked-Out" class on and off.

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

These changes should have no impact on any existing modules/profiles/etc.

Data model changes

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

These changes should have no impact on existing sites.

Issue fork drupal-2945954

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BEGRAFX created an issue. See original summary.

cilefen’s picture

Title: Duplicated Terminology and User Management » Split “blocked” status into “pending” and “locked-out”

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

prachi24’s picture

Priority: Normal » Major
petiar’s picture

Correct me if I am wrong, but as I got it, Pending and Locked-out users will have the same permissions (none), but the advantage of this would be that you know why an user has no permissions - Pending because it has not been activated yet and Locked-out because it's fake or misbehaving account, right?

Warped’s picture

On a small, low activity website and a single user administrator, the current solution may be awkward, but manageable. As soon as you add more that manage new users, or the site is very active, it quickly gets to be unmanageable. But instead of adding a role with no permissions, a simpler route would be to keep their status the same as blocked and just change the login system to refuse *Pending* as well as *Blocked*. There are security vulnerabilities that require an authenticated user. Keeping them from logging in before approval is an important step in better security.

prachi24’s picture

@petiar You are absolutely correct. This is the actual purpose of the issue mentioned above.

cilefen’s picture

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

petiar’s picture

I finally got myself to start working on this, however, I got stuck at the admin users table view. Currently, the status is treated as a boolean value and the output is rewritten to Active/Blocked. However, with three statuses I can't do this anymore. I think we have two options:

  1. as suggested in StatusItem class, make the user status full field type plugin
  2. create view template file which would rewrite the output. Not sure how about the exposed form

I would go with the option 1, so we have this done properly and it can be easily extended in the future. In that case we would need to finish #2936864: Discuss adding a 'status' field type that could be used in place of 'boolean' prior to this one. I am looking forward to your suggestions.