我有一个用于创建新用户的 MVC 控制器操作。我正在尝试存储新用户的其他详细信息,例如FullName
.
问题是Profile
针对当前经过身份验证的用户,在我的情况下是管理员。如何引用新创建用户的个人资料?
var user = Membership.CreateUser(newUser.Username, newUser.Password, newUser.Email);
Profile.SetPropertyValue("fullname", newUser.FullName); //wrong - stored against the admin that is creating the user
user.??? //I do have the user, but can I get the profile?