SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have site column called users based of people and groups and for example it has 4 users separated by semicolon.

Questions: 1) Can I copy the values from users site column to site permissions owner group.

2) How can i split users into multiple lines from users site columns, currently it is in one line with semicolon.

I really appreciate your response.

share|improve this question

With the help of below code you can values from people sitecolumn and play as you want

SPList oList = new SPSite("http://devbox1:71").AllWebs["PCS"].GetList("http://devebox:71/PCS/Lists/UserList");

SPListItemCollection collListItems = oList.Items;         
SPListItem itemFound;         
if (oList.EnableVersioning)         
    foreach (SPListItem oListItem in collListItems)             
        string[] strName;
        string str = oListItem["UserField"].ToString();
share|improve this answer
It's worth noting that you'll have two memory leaks using this code sample. One for the SPSite & one for the SPWeb objects you open up. – Tim Gabrhel Apr 4 '12 at 21:49


SPGroup group = web.AssociatedOwnerGroup;
SPFieldUserValueCollection users = 
    new SPFieldUserValueCollection(web, item["users"] as string);
foreach (SPFieldUserValue user in users)
    if (null != user.User) 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.