Added condition to setUserAttributes to check if arrays match (count), and added error reporting to same.