I'm writing a custom module for user registration. Most of the profile data is saved in our backoffice, but the password/email is saved in Orchard.
Somewhere in the code is this line:
var user = membershipService.CreateUser(new CreateUserParams(saveClientResponse.ClientId.ToString(), member.Password, member.Email, null, null, false));
Later in the code, I try to get the inserted user:
var test = membershipService.GetUser(saveClientResponse.ClientId.ToString());
However, test == null when this line is executed in the same http request as CreateUser(). During the next http request, I can retrieve the user without problems.
What happens? Is this NHibernate? Does it only write to the database at the end of the request?