Esempio n. 1
0
 public virtual bool ChangePassword(string oldPassword, string newPassword)
 {
     SecurityServices.CheckPasswordParameter(oldPassword, "oldPassword");
     SecurityServices.CheckPasswordParameter(newPassword, "newPassword");
     if (!SystemWebProxy.Membership.Providers[this.ProviderName].ChangePassword(this.UserName, oldPassword, newPassword))
     {
         return(false);
     }
     this.UpdateSelf();
     return(true);
 }
Esempio n. 2
0
 public virtual bool ChangePasswordQuestionAndAnswer(string password, string newPasswordQuestion, string newPasswordAnswer)
 {
     SecurityServices.CheckPasswordParameter(password, "password");
     SecurityServices.CheckForEmptyOrWhiteSpaceParameter(ref newPasswordQuestion, "newPasswordQuestion");
     SecurityServices.CheckForEmptyOrWhiteSpaceParameter(ref newPasswordAnswer, "newPasswordAnswer");
     if (!SystemWebProxy.Membership.Providers[this.ProviderName].ChangePasswordQuestionAndAnswer(this.UserName, password, newPasswordQuestion, newPasswordAnswer))
     {
         return(false);
     }
     this.UpdateSelf();
     return(true);
 }
        public virtual bool ChangePassword(string oldPassword, string newPassword)
        {
            SecurityServices.CheckPasswordParameter(oldPassword, "oldPassword");
            SecurityServices.CheckPasswordParameter(newPassword, "newPassword");

            if (!SystemWebProxy.Membership.Providers[ProviderName].ChangePassword(UserName, oldPassword, newPassword))
            {
                return(false);
            }
            UpdateSelf();
            //_LastPasswordChangedDate = Membership.Providers[ ProviderName ].GetUser( UserName, false ).LastPasswordChangedDate;
            return(true);
        }