3

Currently status column can have only 2 values:

  • 0 - inactive
  • 1 - active

I need to add a new status for the user: temporarily inactive. Will it be safe if I use status = 2 for it?

2 Answers 2

0

long story short: no, never

why: user->status is deep bound into drupal core, so in order to handle status=2 you will have to hack the core

there are alternatives: you could use another field or expand user entity

1

Why would you need to?

You can attach a boolean or numeric field to the user entity.

Navigate to Admin -> Configuration -> Accounts -> Add Field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.