Ejemplo n.º 1
0
        public async Task <bool> ChangePassword(string email, string code, string password)
        {
            User user = await _userResetFinder.FilterAsync(new UserResetPassModel
            {
                Email = email,
                Code  = code
            });

            if (user != null && user.IsConfirm)
            {
                user.Password          = password;
                user.ResetPasswordCode = string.Empty;
                await _userUpdater.UpdateAsync(user);

                return(await Task.Run(() =>
                {
                    return true;
                }));
            }

            else
            {
                return(await Task.Run(() =>
                {
                    return false;
                }));
            }
        }
Ejemplo n.º 2
0
        public async Task UpdateAsync(T model)
        {
            await updater.UpdateAsync(model);

            OnChange.Invoke(this, EventArgs.Empty);
        }