Log a user in through drupal API
mwskuzzy - July 3, 2009 - 08:39
Hi All
Is there any way to automatically log a user in?
I want to create a new account for a user and then log them in automatically after I have created the new user account. I know "user_load" returns a full user object but does this log the uid in as well?
Thanks
Ross

Use Logintoboggan Module
You can use Logintoboggan Module which provides this functionality.
Project page: http://drupal.org/project/logintoboggan
thanks for the quick reply
thanks for the quick reply but i specifically need to do this through code. Does this module provide specific methods to do this?
Thanks
Servant, Husband, Father, Programmer
Hello, When user register
Hello,
When user register then he may login after created account & it is fulfilled by logintobogan module then why you want to do that by code can you specify your requirement briefly.
Thanks
Hi I have a custom order
Hi
I have a custom order process which uses web forms module. I would like to allow a user to order a product without having to register and then after they have specified their email address and details I want to create a user account and log them in automatically via code. This is stupid I know but my boss is insisting on this method.
Thanks
Servant, Husband, Father, Programmer