Are there any modules available for adding more values to the standard Drupal user status?
By default we have "Active/Blocked" values, but I would like to extend it with more values.
Are there any modules available for adding more values to the standard Drupal user status? By default we have "Active/Blocked" values, but I would like to extend it with more values. |
||||
By default, I don't think there's any way of doing this. The user status is used by other parts of What you could do however, is add a custom status field to your users and use that. You'll get most of the normal benefits of the Drupal user status, but it'll be as extensible as you need. Combine it with Field Permissions to prevent users from being able to see or edit (or either one of those options) themselves should you need to.
If you still want a user status that disabled the user account, then you could create a value on your custom status field (let's call it Disabled and then configure a Rule that says:
*NB If you do this, don't forget to create an opposite rule that enables the user account based on your field value :) |
|||
|
You can add one more option to the status field using You may need a database entry also, so you can add a CCK field to the user account, and when a user receives the extended value, simply update the CCK field value using a custom submit handler and finally calling |
|||||||||||||
|
hook_form_alter
to add your values. – Nikhil M Apr 24 at 7:23