0

I've a site setup in Drupal 7 where every user who is not authorized is shown a username/password page through Logintoboggan Module.

All went good, until a unique requirement came.

First Scenario:-

I need to have a universal login page which will only have a password field. So whenever a user comes to the site and is not logged in, he will be shown a page with only Password Entry, where he will enter a password and will enter the site. The role of this user would be Authenticated User. (I guess this can be done if I hide the username field somehow and pass a hidden username field along with the form )

Second Scenario:-

Whenever user, who is not logged in, wants to log in as an admin, he/she will enter the URL as www.site.com/admin and should be shown normal authentication page, which will have username/password field. One can then, enter the credentials and enter the site as an admin (normally, as we are doing now with every page).

Hence, I need two login page forms; one would have only password field and other would have normal username/pwd fields at a specific URL.

I'd be very thankful if you can help me in any regard.

Thanks.

1

If you are talking about a single account that everyone who uses the site will use, the security implications are horrible. In the context of a business site, what happens if an employee is terminated. Does everyone have to learn a new password. What about the case of one disgruntled user who does something malicious? Do you want to have to track responsibility by back-tracing an IP address? There are so many reasons not to implement this requirement.

Drupal looks up password by user (user name or unique email) and being able to attribute site changes to an individual user, and to control access by individual user is extremely important with most sites. To deviate from the tried and true method will require a custom module, and I seriously doubt it is a good idea simply to alter the user experience.

  • You are right, but this is actually a Proposal Site; an internal site which will be used by the management officials. Through this behavior, we are just making it easy for them to enter into the site with minimal input. Kind of like a Passcode to an iPhone loving generation. – Stephane Saussier Mar 6 '13 at 19:07
  • If this is strictly internal, have your network administrator restrict site access to the IP's of the management officials, and let the anonymous user do the data entry. No login required unless you are administering the site. You might want to look at the User Stats module to record IP addresses. I am not sure it will work with the anonymous user, but the code should help you to develop a function to track submissions by IP. – Triskelion Mar 6 '13 at 19:27
  • It wouldn't serve the purpose as I want to show a proper Log in Page at two different URLs. – Stephane Saussier Mar 6 '13 at 19:45
  • If this is a hard requirement, you are going to have to write your own module to accomplish it. Any challenge-response modules that have been available for Drupal are no longer available. To expand on my prior comment, you might look at the IP Login module. The users would have to log in normally once, then would be automatically authenticated by IP on subsequent visits. – Triskelion Mar 6 '13 at 19:59

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.