I am trying to create a web part which shows a list of all members of a specific sharepoint group. One of the columns of the list must be SPFieldType.User. Do I need to create a SPList? When do I need to update the list? when you add a new user to the group or when the page which contains the web part reloads? what is the best solution? thank you. (I dont want to use Members web part)
Unfortunately there is no easy solution for doing this in the general case, because the recommended way to add people to SharePoint groups is to do it through AD-groups which can be nested, cross-domain, ...
If you make the assumption that users are only added directly to the SharePoint group, then your web part can just show the content of the SPGroup.Users property and there is no need to maintain a list for that.
SharePoint already got a list on Top Level Site for managing the users and groups called "User Information List". So you don't need to create a separate List for that.
You can create a webpart, to show all the users for the specified group. For group specification, create a custom property in webpart to specify the SharePoint Group Name.
Please refer to This link . Here the author tries to retrieve all users from all groups.
1) you need not create a new list. 2) Modify the code in above link to suit your needs. You can specify the group name in object model or have it as a property in your wen part.