public bool ValidateUserLogin(string userName, string password, ref TANK_usp_sel_Security_spResults userDetails) { userDetails = _sharedFunctions.GetUserDetails(userName); var salt = userDetails.PasswordSalt; var hash = GeneratePasswordHash(password, salt); return(userDetails.PasswordHash == hash); }