How can I get the list of groups a user belongs to?

Hi all,
How can I get the list of groups a user belongs to?
I want to pass the username as an input and it should list me the group names instead of group ids (or) [group:1], [group:2], [group:3]
It should return me something like Administrators, All Users, APN Users, etc.

The method getusergroup(userName) was not helpful. Is there any other method?
Please provide your inputs....

OriginalPostID-105880

OriginalPostID-105880

  Discussion posts and replies are publicly visible