Esempio n. 1
0
 public AuthPage()
 {
     CurrentMember = Membership.GetUser();
     if (CurrentMember != null)
     {
       NtsMember=  bizNtsMember.NM_GetUser(CurrentMember.UserName);
     }
 }
Esempio n. 2
0
        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            NTSMember ntsMember = new NTSMember();
            ntsMember.Email = email;
            ntsMember.Name = username;
            ntsMember.Password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(password, "MD5");
            DalMember.Save(ntsMember);
            status = MembershipCreateStatus.Success;
            MembershipUser mu = new MembershipUser("NTSMembershipProvider",
               username, ntsMember.Id, "", "", string.Empty,
               true, true, DateTime.Now,
               DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);

            return mu;
        }