def user_data_from_results(res, username, key)
      users = res['users']
      users.each do |user|
        return user[key] if user['name'] == username
      end
      nil
    end
def user_data_from_results(res, username, key)
      users = res['users']
      users.each do |user|
        return user[key] if user['name'] == username
      end
      nil
    end
Extract the user data for 'key' based on the user result object
 @param [Hash] res result from a request to /users
 @param [String] username
 @param [String] key one of the user data returned (uid, mail, tfa_status...)
 @return [Object] Integer, String, Array, Hash depending on the user data