var user = Membership.CreateUser(username: model.Email,
password: Membership.GeneratePassword(10, 0),
email: model.Email);
var member = uQuery.GetMember((int)Membership.GetUser(model.Email).ProviderUserKey);
var confirmationToken = Guid.NewGuid().ToString().Replace("-", "");
member.Email = model.Email;
member.AddGroup(MemberGroup.GetByName("Common Member"));
member.getProperty("whyMe").Value = model.WhyMe;
member.getProperty("isActivated").Value = false;
member.getProperty("isAnonymous").Value = true;
member.getProperty("confirmCode").Value = confirmationToken;
member.Save();
It work's OK.
But after that I call another mvc action where I try to set few true/false properties:
Code:
var user = Membership.GetUser(email);
var member = uQuery.GetMember((int) user.ProviderUserKey);
member.SetProperty("isActivated", true);
member.SetProperty("isConfirmed", true);
member.SetProperty("isEmailConfirmed", true);
member.Save();
It doesn't throw any exception and it doesn't save data for this member. I also tried to use member.getProperty("isActivated").Value = false;
but it also didn't work.
Is anybody have thoughts what can be wrong with it?
Updating Member's property problem
Hi everyone
I'm trying to create member with this code:
Code:
It work's OK.
But after that I call another mvc action where I try to set few true/false properties:
Code:
It doesn't throw any exception and it doesn't save data for this member. I also tried to use member.getProperty("isActivated").Value = false;
but it also didn't work.
Is anybody have thoughts what can be wrong with it?
is working on a reply...