code: public User getUser(String cuid) {
          User user = UserGroupCache.getUser(cuid);
          if (user == null)
              return null;
          // add empty attributes
          if (user.getAttributes() == null)
              user.setAttributes(new HashMap<String,String>());
          for (String name : UserGroupCache.getUserAttributeNames()) {
              if (!user.getAttributes().containsKey(name))
                  user.setAttribute(name, null);
              // substitute friendly attribute names
              if (user.getAttributes().containsKey(User.OLD_EMAIL)) {
                  String oldEmail = user.getAttributes().remove(User.OLD_EMAIL);
                  if (user.getAttribute(User.EMAIL) == null)
                      user.setAttribute(User.EMAIL, oldEmail);
              }
              if (user.getAttributes().containsKey(User.OLD_PHONE)) {
                  String oldPhone = user.getAttributes().remove(User.OLD_PHONE);
                  if (user.getAttribute(User.PHONE) == null)
                      user.setAttribute(User.PHONE, oldPhone);
              }
          }
          return user;
      }
docs: Does not include non-public attributes.
  Includes empty values for all public attributes.