Registration of multiple user roles from different registration pages with Profile 2 module

Posted on Monday, December 9, 2013
Registration of multiple user roles from different registration pages with Profile 2 module


Drupal got a great user registration system and management but it can be made awesome with Profile 2 and Profile 2 Registration Path modules.

Drupal 7 allow us to add field to user registration form using "admin/config/people/accounts/fields" page and anonymous user can fill these fields from user registration form. But these fields will be same for all user roles, hence providing the same privileges to all registered users. Take a scenario in one of your Drupal development project where you have two roles teacher and student and you want them to have different user registration fields and privileges. In this scenario Drupal Profile 2 module ( and Profile2 Registration Path module ( allow you to create two different user registration form with different fields for both user roles. It also allows you to assign different roles according to registration form and have different privileges on their respective accounts.

To make the above scenario work within your Drupal development project, first you need to enable Drupal Profile 2 module and Profile2 Registration Path module. (shown in the image below) After enabling both Drupal modules add two different user roles teacher and student for which you need different user registration forms. For this, you need to create two profile type for these user roles from "admin/structure/profiles/add" page. Here add profile type for teacher role called "Teacher". Enable unique path registration option which is provided by Profile2 Registration path module. This option allow us to set unique url path like "teacher/register" in which teacher registration profile form will open. Now select role which will be assigned to user on registration based on registration path provided above and save profile type. Now in "admin/structure/profiles" page you have teacher profile type. Go to manage fields page "admin/structure/profiles/manage/teacher/fields" to add field to teacher profile type such as teaching field, previous school and mobile. And these fields will be shown on teacher registration page. Following the above step you can create student profile type with unique registration path "student/register". And add fields to student profile type such as gender and class. Now you have got two user registration forms for teacher and student user roles with different registration paths "teacher/register" and "student/register". And appropriate role will be assigned to user based on registration path. Profile2 registration path module also provides options such as:

  • Custom title for login, register and forgot password pages.
  • Display a confirmation message to user after successful registration.
  • Wrapping profile fields in a fieldset.
  • Showing profile type fields to core user registration forms and administrator add user forms.
  • You can also assign profile type to Drupal core user registration path "user/register" from unique registration path option.

Using the above information you would be able to assign different user roles/privileges using seperate registration forms.


custom essay (not verified)

Friday, February 24, 2017

Wonderful site and I wanted to post a note to let you know, ""Good job""! I’m glad I found this site. Brilliant and wonderful job ! Your site has presented me most of the strategies based on drupal7 which I like. Thanks for sharing this. And, to tell the truth, sometimes I ask for online homework help on ( custom essay writing service .

Anonymous (not verified)

Wednesday, March 22, 2017

Your article could be very nice thanks for share this statistics. It’s very beneficial for all peoples there are all opportunities to provide for this blog. i am a writer working with on line writing provider it's going to deliver us the pleasant desire of writing carrier for your educational lifestyles. custom dissertation writing service

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.