i have client who has design a front-page accept two types people login. one is student, one is staff. he want two login forms in one page and different form will check the different roles login. Ex. student goto login student login form, staff goto login staff login form, if student goto staff login form login will appear a alert!how can i do?

Comments

wusel’s picture

To have two login forms in drupal is nonsense!

In drupal we have and need only ONE login form!

After login drupal knows the role(s) of the user.
If you want, you can show the roles of the user e.g in a block, e.g. using a view.

Wusel

zenowkc’s picture

is not the sense or nonsense problem, the problem is designer designed the template is like this!
i just following to build. and the owner want this! i try the view and block already, it doesn't work.
if the question is like this, can u have other way to solve it!

WorldFallz’s picture

not a code question, so I've moved the post to the correct forum

And you can use the profile2 module to create different profiles for different roles and autoassignrole or profile2_regpath to setup different registrations for different roles.

There's also apply_for_role if you want certain roles to require oversight/approval.

zenowkc’s picture

i know how to use profile2 create different profiles for different roles! and i already use profile2_regpath. yes it make two different registration and login pages, but the login page can not check the role to login. for example, student login page staff and student can use the same form login. i want when login the form can check the role first then accept the role to login and user id and password!!

wusel’s picture

Let the designer change the design and you have no problems.
His design is not drupal like!

I cannot understand, why his design cannot be changed.

I hope for you, you are a team!

Wusel