powered by Jive Software

A module for Registration Settings

i make a module for Registration Settings, want to reject/allow user modify information(VCard). ) user change peronsal VCard information. but i can’'t make sure it works well.can somebody show some advise?


reg-settings.jsp

Line 34 add:

boolean canModifyPersonalInfo = ParamUtils.getBooleanParameter(request,“canModifyPersonalInfo”);

Line 44 add:

regHandler.setCanModifyPersonalInfo(canModifyPersonalInfo);

Line 65 add:

canModifyPersonalInfo = regHandler.canModifyPersonalInfo();

Line 164 add:


IQRegisterHandler.java

private static boolean canModifyPersonalInfo;

Line 147:

canModifyPersonalInfo = JiveGlobals.getBooleanProperty(“register.personalinfo”, true);

Line 435 :

public void setCanModifyPersonalInfo(boolean allowed) {

canModifyPersonalInfo = allowed;

JiveGlobals.setProperty(“register.personalinfo”, canModifyPersonalInfo ? “true” : “false”);

}

public boolean canModifyPersonalInfo() {

return canModifyPersonalInfo;

}


IQvCardHandler.java

add:

import org.jivesoftware.messenger.handler.IQRegisterHandler; //for canModifyPersonalInfo

Line 79 Modify:

if (!reghandle.canModifyPersonalInfo()) {

result.setError(PacketError.Condition.internal_server_error);

}

else{

VCardManager.getInstance().setVCard(user.getUsername(), vcard);

}


i think that it can reject/allow user change owner vcard information.

i don’'t know how it works well ?