By rlshea on
I am trying to embed the user registration form on a regular content node. In researching how to do this I have found information for overriding the user register function which I don't think is what I want to do. I do not want this new page displayed every time someone chooses to register. I imagine this is probably just a simple function call done within the node but I am a little new to Drupal so any advice is appreciated. Thanks.
Comments
I am trying to embed the
I am trying to embed the user registration form on a regular content node.
What is the actual goal (functionality) you are trying to achieve? For example, if you want to do this to enable searching user profiles as content, there are several modules for this.
===
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." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
The goal is to allow
The goal is to allow visitors to register from a primary content page without having to go through the normal register page. Trying to get rid of an extra click from the visitor's perspective and bundle it into one page.
I want to maintain the normal register page for visitors that do not come through this specific content node which is why I'm not sure if the complete override of the register function is the right solution.
excellent-- that's exactly
excellent-- that's exactly what I wanted to know. In this case, I think you can just put this code:
print drupal_get_form('user_register');anywhere in the page where you want the form to appear (you'll have to use the PHP input format). It worked for me on my d6 box, it should work on d5 also.
===
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." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Works great, thanks.
Works great, thanks.
does this work for you if you try to register a duplicate user?
Mine craps out if I try to register a duplicate username.
ok i see the problem
the user name validation function checks to see if arg(1) is register which is thrown off bc of course I'm embedding it in another page. that function might need to be refactored -- maybe it has in v6? - who knows but I found a way to get it to work now.