1

Is it possible to login to Drupal with just a number?

Use case is a kiosk where users have a nfc tag. So my idea was to hide the input field an use the number retrieved from the nfc tag to identify the users.

The kiosk is only used internally and there would be no keyboard just a touchscreen.

Thanks

  • Two questions: What version of Drupal? Is there a reason to the value retrieved from the NFC tag being limited to numeric? – LittleCoding Mar 3 '17 at 16:06
  • Do they actually need to log in? What will users do after they have logged in? – Jaypan Mar 3 '17 at 16:18
  • 4
    I made a contrib module for this back in the day: drupal.org/project/identification – tyler.frankenstein Mar 3 '17 at 16:44
  • They wil have the abbility to order clothes, protection equipment etc. The nfc tags are used as acces control on the building and are write protected. Tyler seems like your module fits my use case thanks wil test this. – GoempieK Mar 3 '17 at 17:28
1

You should definitely have a look at the Identification module. Some details (from its project page):

... allows users to login with a custom identification number (or string). To configure this module, the site builder creates a (or specifies a pre-existing) field on the user entity. The value stored in this field for a particular user can then be used as the identification login credential.

Use Case

An organization that wants users to be able to login using a custom identification number and password. This means each user account will have three unique identifiers:

  • core user name
  • core user e-mail address
  • custom user identification number (or string)

Credits (and kudos) to tyler frankenstein!

Note: This answer applies to both D7 and D8.

| improve this answer | |
0

So basically, you mean just a number and no password? The simplest way to do this would be to use the number as the username (when adding a user), and then a predefined password that's the same for all users.

This approach has some major security caveats, but would work. In JS on the login page, or in whatever approach you use for the kiosk, have the number fill in the username field, and fill in the hidden password field with the default password.

Modifying the look and feel of the login form/page can be done through hook_form_alter() and CSS.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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