1
votes

How can I add user register form to node create form in Drupal? There is a module http://drupal.org/project/inline_registration , but it has some bugs. I think I saw alternative one, but I cant find it now.

1
Did you find out how to do this in the end? I'm using inline registration but I need to be able to do it for a Log In as well as a Register and I can't find anything at all. - Garry

1 Answers

2
votes

Beware the many security problems possible when giving essentially anonymous users access to node creation. That said, here are some thoughts.

If you can live without having the form registration on the same page, a much easier solution would be to redirect the user to the node create form after successful login. This amounts to perhaps just one line of code (more if you only want to redirect on certain conditions - e.g. the user registers for a certain type of account). That way you can use the built-in validation and submit handlers of the user module.

If you must have both on the same page, you could use hook_form_FORM_ID_alter, and output the user registration form fields if $form['#node']->nid isn't set. Be sure to validate the input as well.