In my own controller I have the following code:
var result = await base.RegisterAsync(model, returnUrl, captchaValid, form);
if (cart.Any())
((RedirectResult)result).Url = "/registerresult/1?returnUrl=/onepagecheckout#opc-billing";
//send email
var email = new ShopRegisterEmailRequest(model.FirstName, model.Email, "NopShopRegistrationTemplate.cshtml");
await myService.SendRegistrationEmailAsync<bool>(email);
return result;
In the line
await base.RegisterAsync(model, returnUrl, captchaValid, form);
,
inspecting the code there is a line that does the login (what is suggested), and it runs every time.
return await _customerRegistrationService.SignInCustomerAsync(customer, returnUrl, true);
So does I need to do something more, or something different?
thnx