Register or login before content is save

Events happening in the community are now at Drupal community events on www.drupal.org.
halloffame's picture

I'm scratching my head over this one for four days now. We've seen this everywhere. Visitors fills up a certain form but they need to login or register before the action takes place.

I am able to display an error message or redirect them to the register or login page. But what I want here is the process to be seamlessly consistent without losing the session.

User fills up the form -- hit submit -- prompt to login or register if anonymous-- user logs in or register -- content posted -- author now authenticated user redirected to the newly created node.

I have seen numerous similar posts with no answer over at main site's forum. I hope someone can help me on this one. Then we can add this to the getting started/documentation of the module. A LOT of people could really use it.

Thanks in advance.

Comments

Just lock the form?

galexkeene's picture

Maybe I am misunderstanding, but why are you showing this form to the user if they need to log in/register to be able to use it? Just don't show them the form and instead show them a link to Log in/Register if they want to use that form.

I am assuming this is more about comment forms than anything else, so why not just make the comment form conditionally show only if they are logged in, and if not a message like "Log in to comment" -- exactly as this website does.

No this is not about the

halloffame's picture

No this is not about the comment form. It's for a custom content type. This is a very good strategy in luring your visitors to create an account on your site. It will also allow the visitors to see what the privileges of a member before actually becoming a member. A lot of websites use this strategy. Most people doesn't even bother to click the register link but when the actual form is present that would be another story. They started filling it up so might as well go to the whole process and finish it.

There is an Inline

itserich's picture

There is an Inline Registration module which allows a person to register at node creation.

Also Rules allows for Create a User which might allow customization, though I do not know how to use it and am trying to learn.

And I agree, requiring people to register before even seeing the form is going to cause a lot of people to not bother to register.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week