Exemplo n.º 1
0
        public override bool ResetPasswordWithToken(string token, string newPassword)
        {
            PasswordReset reset = PasswordReset.OneWhere(c => c.Token == token);

            if (reset == null)
            {
                return(false);
            }
            reset.WasReset = true;

            Password password = Password.OneWhere(c => c.UserId == reset.UserId);

            password.Value = newPassword;

            password.Save();
            reset.Save();

            return(true);
        }