views:

48

answers:

2

The website has a normal registration form which allows users to register and the likes.

I have created a new custom form in which I am capturing the username/password etc. How do I manually register the user in Drupal system?

Thank You

+2  A: 

Check out hook_user and user_save().

http://api.drupal.org/api/function/hook_user

http://api.drupal.org/api/function/user_save/6

Kevin
A: 

It's not the answer you want, but you'd save yourself a lot of trouble by using hook_form_alter to change the current registration form:

http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6

lazysoundsystem
thanks a lot as that was a good link

related questions