[Building Sakai] site.addMember not working

David Wafula davidwaf at gmail.com
Wed Jul 13 01:59:29 PDT 2011


Hello all,
Am creating a user, then attempting to add this user as student to a course
site. The user creation works fine. But not addMember.

What possibly could be wrong with the  following ?

//This is how am creating user, working fine:
 userDirectoryService.addUser(null, userId, givenName, surname, email, null,
"guest", null);


String currentSiteId = toolManager.getCurrentPlacement().getContext();
Site site = siteService.getSite(currentSiteId);

//this is not working
site.addMember(userId, "Student", true, false);


The site has a role Student, but site.addMember does not add the user as a
student. The weird thing it doesn't complain either ..shouldn't it tell me
if it is failing, and why ?


regards,
-- 
David Wafula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110713/c2d42d84/attachment.html 


More information about the sakai-dev mailing list