Esempio n. 1
0
        public bool ChangePassword(ChangePasswordViewModel model)
        {
            var driver = _driverRepository.GetDriverById(model.DriverId);

            var user = Membership.GetUser(driver.EmailAddress);

            if (user != null)
            {
                return user.ChangePassword(model.OldPassword, model.NewPassword);
            }

            return false;
        }
Esempio n. 2
0
        public bool VerifyOldPassword(ChangePasswordViewModel model)
        {
            var driver = _driverRepository.GetDriverById(model.DriverId);
            bool authenticated = Membership.ValidateUser(driver.EmailAddress, model.OldPassword);

            return authenticated;
        }