account type (roles) for student and tutor

mm167 - November 6, 2008 - 05:59

just want to know the Drupal way to make this ....

In order to build a web for student and tutor.
when register a new user account, member MUST select either register as "student" OR "tutor".
Question: how to add this "account type" or "role" in drupal user registration? which module is the answer?

of course, the profiles are not the same. so, 2 profiles will be required.

thanks.

This looks like exactly what

JonGirard - November 6, 2008 - 06:04

This looks like exactly what you want.
http://drupal.org/project/user_selectable_roles

Jon.

thanks Jon... that module

mm167 - November 6, 2008 - 07:12

thanks Jon...

that module answer 50% of my request.

the module let user select the "account type" during registration AND also allow change after registration.

but for my student-tutor web site, I dont allow change after registration (at least by the user himself)

I believe there are many web sites are for 2 groups of member;
i.e. boys vs girls, supplier vs consumer, teachers vs students

profile contents, member fees, node permissions, ..etc should be different.

any idea, ..Jon?

Hmm.. did you check "access

JonGirard - November 7, 2008 - 03:50

Hmm.. did you check "access control?" It's possible that the modification of the role after registration option could be disabled by simply changing some settings in access control. I know, in the standard user core module, changing of username's can be disabled after registration for certain user types (but that's beside the point.)

Another thing you could, if the select option is enclosed in a particular div class (firebug can help with that,) then in the "user.tpl.php" page template add some code such as

<?php
global $user;

$student_role = 3; // Change so this reflects the role id of the student role
if ( isset($user->roles[$student_role]) ) {

print
'<style type="text/css"> .divsurroundingfield { display: none; } </style>';

}

else {

}
?>

As for the content on the profile's being different, look into doing something such as this: Allow each user to create a biography node (only 1 can be created with bio), but it would automatically be created with a workflow. If you wanted to have different profile fields automatically displayed and whatnot on the profile, then look into some code such as the above in the user_profile.tpl.php file.

Jon.

i found nf_registration_mod

mm167 - November 7, 2008 - 05:59

i found nf_registration_mod ;-)
but ..it is too complicated ;-( ..i am still reading the readmes .....crying ....

let me see if i can use your tpl.php way ...

anyway ...thanks Jon

maybe the

WorldFallz - November 8, 2008 - 13:37

maybe the http://drupal.org/project/userprotect module would be useful?

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Answers: AutoAssignRole and Profile_Role

mittalpatel - June 27, 2009 - 03:31

AutoassignRole module, http://drupal.org/project/autoassignrole , will enable you to show Role Selection on registration page and Profile_Role, http://drupal.org/project/profile_role , will let you create different profile fields for different roles.

- Mittal Patel
http://www.MittalPatel.co.in

 
 

Drupal is a registered trademark of Dries Buytaert.