Hi,
i am adding Users to a group as shown below d want to prevent that a user
be added to a group twice. It is not working this way.
if( null == groupDoc.getXObject(groupDocumentReference, "member",
xwikiname)){
// Add a member object to document
BaseObject memberObj = groupDoc.newXObject(
groupClass.getDocumentReference(), context);
memberObj.setStringValue("member", xwikiname);
context.getWiki().saveDocument(groupDoc, context);
}else
log.error("the user already existed in the requested
group...");
I will appreciate any help.
Thanks