[Building Sakai] Getting member uid based on role

Zhen Qian zqian2004 at gmail.com
Thu Apr 14 13:46:33 PDT 2011


Hi, Mustansar:

You can first get the AuthzGroup out from the site reference:

AuthzGroupService.getAuthzGroup(site.getReference())

and use the following function from AuthzGroup object to get those user with
Student role:

   /**

 * Access all users who have an active role membership with this role.

 *

 * @return The Set of user ids (String) who have an active role membership
with this role.

 */

public Set<String> getUsersHasRole(String role);

Thanks,

- Zhen


On Thu, Apr 14, 2011 at 4:31 PM, Mustansar Mehmood <mustansar at rice.edu>wrote:

>  Hi,
>   Is there any(direct) way in sakai to get list of members in a site based
> on role ?  For instance I want to pull instructor(s) for a site or
> students or TA's.
> site.getStudentList()
>  I am  trying to avoid rewriting what  has already been written.
> Thanks,
> Mustasar
>
> --
> Mustansar Mehmood
> Educational System Developer& Integrator
>
> Information Technology
> 6100 Main St. MS 119
> Houston Texas 77005
>
> Phone:(713)348-2523
> Fax  :(713)348 6099 email:mustansar at rice.edu
>
>
>
>
>
> I have yet to see any problem, however complicated, which, when,you  looked at it in the right way, did not become still more complicated.
>     -- Poul Anderson
>
>
>
> _______________________________________________
> 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/20110414/fa62507c/attachment.html 


More information about the sakai-dev mailing list