Target:
Show the All People View in SharePoint 2013 and get users' information
form this list instead of user profile classes.
Details:
To show the All People information in SharePoint 2013:
-
Go to the Site Settings.
-
Select the People and groups hyperlink.
-
Select any group.
-
Copy the URL and paste it into another browser. Next, change the
MembershipGroupId to 0 as follows.
-
Before:
http://myserver/_layouts/15/people.aspx?MembershipGroupId=7
http://myserver/_layouts/15/people.aspx?MembershipGroupId=7
-
After:
http://myserver/_layouts/15/people.aspx?MembershipGroupId=0
http://myserver/_layouts/15/people.aspx?MembershipGroupId=0
-
This will show the All People information:
- I will create console application to demonstrate get information from this list:
using Microsoft.SharePoint;
using System;
namespace UserInformationListDemo
{
class Program
{
static void Main(string[] args)
{
using (SPWeb web = new SPSite("http://myserver").OpenWeb())
{
SPList
userInformationList = web.Lists.TryGetList("User
Information List");
if (userInformationList != null)
{
foreach (SPListItem user in userInformationList.Items)
{
Console.WriteLine("User Id : "
+ user.ID);
Console.WriteLine("User Name : "
+ user.Name);
Console.WriteLine("User Account : " + user["Account"]);
Console.WriteLine();
}
}
}
}
}
}
|
-
Result :
2 comments
So useful !
ReplyPortekiz yurtdışı kargo
ReplyRomanya yurtdışı kargo
Slovakya yurtdışı kargo
Slovenya yurtdışı kargo
İngiltere yurtdışı kargo
S5X
Post a Comment