In my website have two types people login one is designer another is reader, i want people come to login my website by role. Mean designer go to design login form to login. Reader go to reader login form to login. my question is:

  1. how to show two login forms in same page?
  2. how to check the role when the visiter login at the same time in login form?
  3. is it any module i can use or i need do something customize the user module and how customize?

Plz help!


Drupal does not support different login forms. User is either logged in or not, and his privileges depend solely on his roles.

  1. You can put a block multiple times on one page using MultiBlock
  2. User has his roles, check them normally. He will have his role no matter what form will he use.
  3. If you want dynamically give roles, yes, you need to write your own module that will act kinda like login handler, but be prepared to live with huge access permissions problems.

If by login you actually mean the actual account creation, you might want to investigate the Auto Assign Role module:

The Auto Assign Role module serves three primary purposes. The first is to provide an automatic assignment of roles when a new account is created. The second is to allow the end user the option of choosing their own role or roles when they create their account. The third is to provide paths that will trigger a specific role when an account is created. The administrator has full control over these functions and can have them working together or independently of each other. Auto Assign Role is integrated with the Content Profile module so that you can have content types serving as registration pages. You can even replace the default user/register page with a customized version of your own design.

Otherwise, what @Molot mentioned previously is about it: Drupal doesn't rely upon where you login to generate roles for the user.

  • i already read auto Assign Role modules, yes it can help me create two different types login form and register form. but it can not check they're role in the login form, i mean in designer login form can access reader to login, and reader login form also access designer to login. i want only designer can access their login in their own login form. Also i cannot make two login form appear in one page. i try use view and panel, but it doesn't work.
    – zeno
    May 15 '13 at 4:26

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.