creating members and assigning roles

jrbrown1977@gma... - January 31, 2009 - 16:32

Hello,

I have this add member page, where the user needs to enter a bunch of information, and when they hit submit I need to create the member.

Is it as simple as doing a sql insert into the drupal user table?

And if I wanted to assign a particular role, would I be inserting into the user_role table?

Is there an API that I can use to create members?

Thanks in advance,

J

_

WorldFallz - January 31, 2009 - 16:42

Just use the builtin registration process. You can augment it with the bio module to have your additional info integrated into the registration process. There's also modules for assigning roles or creating rules to assign roles.

===
"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

Based on my customer needs

jrbrown1977@gma... - January 31, 2009 - 17:06

Based on my customer needs that is not how they want it done. Is there a module api?

_

WorldFallz - January 31, 2009 - 17:09

The entire drupal api is available at http://api.drupal.org. There should be quite a few user related functions to help you out.

===
"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

 
 

Drupal is a registered trademark of Dries Buytaert.