List<Object> keys = (List<Object>)CookieUtility.destroyCookie(is.readDWord());
if(numAccounts != 1)
throw new IllegalStateException("SID_READUSERDATA with numAccounts != 1");
UserProfile up = new UserProfile((String)keys.remove(0));
dispatchRecieveInfo("Profile for " + up.getUser());
for(int i = 0; i < numKeys; i++) {
String key = (String)keys.get(i);
String value = is.readNTStringUTF8();
if((key == null) || (key.length() == 0))
continue;
value = prettyProfileValue(key, value);
if(value.length() != 0) {
dispatchRecieveInfo(key + " = " + value);
} else if(
key.equals(UserProfile.PROFILE_DESCRIPTION) ||
key.equals(UserProfile.PROFILE_LOCATION) ||
key.equals(UserProfile.PROFILE_SEX)) {
// Always report these keys
} else {
continue;
}
up.put(key, value);
}
// FIXME this should be a dispatch
if(PluginManager.getEnableGui())
new ProfileEditor(up, this);