Save customer information and auto login

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi Everyone,

I want save a guest customer information and auto login. But I am failure.


customer = this.CustomerService.AddCustomer(address.Email, address.FirstName, password, false, false, true, out status);
bool isLogin= this.CustomerService.Login(customer.Email, password);


The isLogin is true. But doesn't login the user . and the NopContext.Current.User is changed to null

How can I login as us?
I am using version 1.9

Thanks,
Willam
12 years ago
I solved. I  have spent so much time on this.


                bool isLogin= this.CustomerService.Login(customer.Email, password);
                if(isLogin)
                   FormsAuthentication.SetAuthCookie(customer.Email, false);


Thanks,
Willam
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.