[Building Sakai] site.addMember not working

David Horwitz david.horwitz at uct.ac.za
Wed Jul 13 02:29:39 PDT 2011


I presume you are saving the site with:

siteService.save(site);

?

D

On 07/13/2011 10:59 AM, David Wafula wrote:
> 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
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110713/65bd9c8b/attachment.html 


More information about the sakai-dev mailing list