Log user in after registration

heydemo - February 19, 2009 - 19:31
Project:Email Registration
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I think it makes sense to log a user in after they create an account, if account does not require approval. Since the point of this module is to make creating an account an easy... I've patched this on my own site and will upload if there's interest.

#1

rhughes - February 24, 2009 - 20:55

If you could do that, that would be great.

I am also looking for a really simple login process.

I am a Drupal newbie so if you could provide any information as to where and how to patch that would be awesome.

#2

heydemo - March 8, 2009 - 22:40

Ok, here's the patch. So basically you would put this in your email_registration directory and type:
patch < email_registration-login.patch

Remember to back up before applying patches. And read this for more info:
http://drupal.org/patch/apply

AttachmentSize
email_registration-login.patch 766 bytes

#3

heydemo - March 8, 2009 - 22:54
Status:active» needs review

#4

Chris Herberte - March 8, 2009 - 23:04

Does this patch provide the existing, built-in functionality for logging users in immediately after registration at admin/user/settings ?

... "With it unchecked, users will be logged in immediately upon registering, and may select their own passwords during registration."

#5

mdcook - March 10, 2009 - 17:24

Patch worked. Thank you!

#6

heydemo - March 14, 2009 - 03:36

Chris, not sure I understand. As email registration module stands, user is *logged out* after registering. This patch logs user in, as long as email verification is not required. It is as simple as setting the global user object to the account parameter of hook_user.

#7

greggles - June 10, 2009 - 12:29

I looked through the code in user.module for a little while and I'm not sure why we should have to do this in email_registration.module instead of just letting user.module "do the right thing." But, I'm very new to email_registration module so perhaps it is my lack of knowledge.

@heydemo - could you explain this a bit more? I agree that we should be respecting that core setting.

#8

Chris Herberte - July 13, 2009 - 23:51
Category:feature request» bug report
Status:needs review» reviewed & tested by the community

I can confirm that without this patch email_registration will not work as it should with "Require e-mail verification when a visitor creates an account" unticked.

#9

Chris Herberte - July 14, 2009 - 00:03
Status:reviewed & tested by the community» closed

Committed to 6.x.1.x-dev

 
 

Drupal is a registered trademark of Dries Buytaert.