2 Replies Latest reply on Apr 3, 2013 8:43 AM by devPl83

    How to get user groups

    devPl83

      Hi,

       

      How can I get current users groups since the User and Group objects are marked as deprecated.

      Right now I'm doing the folowing:

       

      User user = request.getResourceResolver().adaptTo(User.class);

      Iterator<Group> groupsIterator = user.memberOf();

       

      Is there an other way to do it properly and without using deprecated methods/objects?

       

      Regards,

      Piotr