Esempio n. 1
0
        public async Task UpdatePassword(string userid, string password)
        {
            if ((await _userTable.SelectById(userid)).Any())
            {
                string hashedPassword = BCrypt.HashPassword(password, BCrypt.GenerateSalt());

                await _userTable.UpdatePassword(userid, hashedPassword);
            }
            else
            {
                throw new ArgumentException("Provided user id could not be found.");
            }
        }