SharePoint發行版本有SharePoint2003、SharePoint2007、Sharepoint 2010、SharePoint2013和SharePoint2016。SharePoint提供了功能強大的團隊協作環境,使得組織能夠在整個組織內部實現整合、組織、查找和提供 SharePoint站點。 最近,碰到一個奇怪的事情,在SharePoint里的用戶,如果顯示方式顯示為登錄名(Account)的方式,顯示為空。如下圖: 1.經過查找,發現是因為用戶屬性 User name為空造成的,如下圖: 2.然后,解決問題就是把這個屬性更新了,其實更新很簡單,SharePoint把這些屬性都存在一個列表里了,這個列表就叫做User Information List,可以通過下面的URL訪問; http://{SiteUrl}/_catalogs/users/simple.aspx 3.找到問題了,我們只需要更新一下列表就可以了,更新列表的代碼附后: ![]() using (SPSite site = new SPSite(SiteUrl)){ using (SPWeb web = site.OpenWeb(WebUrl)) { SPList list = web.SiteUserInfoList; SPListItem item = list.GetItemById(UserId); item["UserName"] = "UserName"; item.SystemUpdate(); }} ![]() Sharepoint 可以幫助企業用戶輕松完成日常工作。 |
溫馨提示:喜歡本站的話,請收藏一下本站!