[development] How to Log in a user

Erik B. Ebright erik at eeeb.com
Mon Feb 27 12:52:24 UTC 2006


Your hacks are of interest to me, currently i am working on a project 
rootsnetwork.org and am looking into some kinda of shopping cart ecomm 
solution to help support artists and the site. If you think your method 
is better than previous methods for drupal ecomm then by all means help 
me out with some code or something.

Good looks.

-eeeb.



stuff at trackingsolutions.ca wrote:

>I formatted the shopping cart to look really nice and added some graphics. I 
>also created a quick buy block that interfaces with the shopping cart to 
>allow a user to click once and checkout at the same time. As well is my 
>latest invention. The ability to register your user in the cart and continue 
>the checkout process without having to check their e-mail and have to come 
>back to login, taking the same checkout steps over again. I also integrated 
>the drupal_get_destination code from 4.7 into 4.6. 
>
>It all works great. I am not finished my hacking but I believe that this cart 
>is by far more functional and user friendly. Are my hacks of interest to 
>drupal? If so I would like to help give back. Please let me know.
>
>Thanks
>
>On February 27, 2006 04:00 am, stuff at trackingsolutions.ca wrote:
>  
>
>>I just fixed it!
>>
>>I know it is a hack but it is awesome customer purchase flow and it is such
>>a minor change. With a small diff and half an our I should be able to
>>upgrage easily.
>>
>><code>
>>
>>if(ereg("cart/checkout", urldecode(drupal_get_destination())))
>>{
>>        //1. Login new user here
>>
>>        $tsiedit['name'] = $account->name;
>>        $tsiedit['pass'] = $pass;
>>        user_login($tsiedit);
>>
>>        $mytext = 'Your account has been created. For security purposes you
>>have been sent an e-mail with your account
>>information. Click the Checkout button below to and enter your account
>>information from the e-mail';
>>        $mytext .= '<br/><br/>';
>>        $mytext .= '<a href="?q=cart/checkout"><img
>>src="themes/tsilinux/images/checkout.png" ></a>';
>>
>>        return $mytext;
>>}
>>else
>>{
>>       //This is the original flow. I go here if the request is not from
>>the cart
>>       return t('Your password and further instructions have been sent to
>>your e-mail address.');
>>}
>>
>>
>></code>
>>
>>Thanks
>>    
>>
>
>
>
>  
>


More information about the development mailing list