Here you will find some thoughts, some tips and some notes that help me to remember or that I think would be nice to share.
terça-feira, 31 de maio de 2016
iMIS - C# - Creating an user credential
Here is a piece of code to create an user credential and update the Asp_membership table.
objContact.CreateUserSecurity("username01", "123456");
objContact.UserSecurity.ExpiresOn = DateTime.Parse("01/01/2050");
objContact.UserSecurity.Save();
objContact.Save();
//Don't forge to update the aspnet_membership table. - Otherwise the forget password doesn't work.
MembershipUser objMembership = Membership.GetUser(sEmail);
objMembership.Email = sEmail;
Membership.UpdateUser(objMembership);
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário