Jump to content

create customer session after customer creation


Recommended Posts

Hello,

I have created a customer through webservices, and now I want to create the customer session, in order to allow another module recover the customer information from $this->context->customer. Which is the proper way to do create a customer session? I have been reading the documentation but I haven't found any Customer::login() or similar.

Thank you,
xavi

Share this post


Link to post
Share on other sites
  • 4 weeks later...

You can make as follows:
$customer = new Customer();
$customer->lastname = 'xxxx';
....
$customer->save();
$this->context->customer = $customer;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More