Every user that we add to our web site have its own ID,
This ID is numeric value. The source of this IDis the hidden list (User Information List) of every web site in SharePoint..
This list can be accessed by the link " /_catalogs/users/simple.aspx" from the every SharePoint web site.
This display the list of web site user that are added to the site.
Simple.aspx page contains a data view webpart that display the list of website users.
To get the data from this list use the following code :
Using this the basic information about the user can be accessed.
Example: To get the user's profile image, use the following code:
This ID is numeric value. The source of this IDis the hidden list (User Information List) of every web site in SharePoint..
This list can be accessed by the link " /_catalogs/users/simple.aspx" from the every SharePoint web site.
This display the list of web site user that are added to the site.
Simple.aspx page contains a data view webpart that display the list of website users.
To get the data from this list use the following code :
SPList spList = SPContext.Current.Web.SiteUserInfoList;
Using this the basic information about the user can be accessed.
Example: To get the user's profile image, use the following code:
SPSite spsite = new SPSite("http://MyWebApplication");
SPWeb spweb = spsite.OpenWeb();
SPList splist=spweb.SiteUserInfoList;
SPListItem userInfo = splist.Items.GetItemById(SPContext.Current.Web.CurrentUser.ID);
string pictureURL = Convert.ToString(userItem["Picture"]);