惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - KXLF

SharePoint 事件 2137 / 2138 :SharePoint 运行状况分析器检测到错误。驱动器的可用空间不足。 SharePoint 事件 7363:对象缓存:缓存使用的超级读者帐户没有足够的权限访问SharePoint数据库。 [转] geochart 地图控件官方示例 Outlook 2007 同步到本地的SharePoint文档库,点击不同文件夹时,总是弹出登陆框 [转]Publishing files stored in the file system through external list(使用bcs映射文件系统) SPContext.Current.Web.CurrentUser 为 null [转]Use PowerShell to Manage Lists, Views, and Items in SharePoint(使用PowerShell管理列表、视图、列表项) 连接TFS服务器记住密码。 [转]Login over HTTPS from HTTP pages(使用https登陆) [转]How to Handle Long PowerShell Statements(在PowerShell中使用多行模式) [转]How to use String.Format in PowerShell?(如何在PowerShell中使用string.format?) 推荐一个电子书网站,里面关于SharePoint的英文书籍有很多。 SharePoint 2010 术语表 [转]SharePoint 2010: Client Object Model for JavaScript (ECMAScript)(使用客户端对象模型) [转]Importing documents to Document Libraries with Mavention Import Document Library Contents(使用VS插件导出文档库内容定义) [转]Import List Instances and their data with Mavention Import List Instance(使用VS插件导出列表数据定义) [转]how to programatically access built-in properties of open xml word doc(如何读取open xml格式文档属性) [转]Content targeting for anonymous users with SharePoint Server 2010(给匿名用户配置外部配置文件) [转][MS-MAVA]: Microsoft Office SharePoint Server (MOSS) Analytics View Access Protocol Specification
[转]Allowing anonymous users access to SharePoint user's profile pictures(允许匿名用户访问用户配置文件中的头像图片)
KXLF · 2011-11-02 · via 博客园 - KXLF

I was developing discussion groups using web parts where I needed to show the discussion posting authors' profile images with the posting detail.

First problem I faced was, how to get the profile image url of the user. I was able to find the details about the User Information List living in the RootSite of the site collection. I was able to get the related user info by getting the list item as below and get the "Picture" property value
and properly formatting it.  

userPictureUrl = SPContext.Current.Site.RootWeb.SiteUserInfoList.GetItemById(itemCreator.ID)["Picture"].ToString(); 
SPFieldUrlValue userProfileImage = new SPFieldUrlValue(userPictureUrl);
authorProfileImageUrl = (new Uri(userProfileImage.Url)).AbsolutePath;
 

But, then I faced the next issue of viewing user's profile image as an anonymous user. To achieve that I had to go through the below process of granting anonymous users access to List and libraries in the mys site site collection and granting "View Items" access to user profile pictures library.

STEP 1:
Go to http://<<MysiteSitecollection web url>>/_layouts/settings.aspx
Go to "Site Permissions" and click Anonymous Access from the ribbon
Select "Lists and libraries" and click "OK".

STEP 2:
Go to View All Site Content -> User Photos -> Settings (Picture Library Settings)
Go to "Permissions for this picture library"
Click "Stop Inheriting Permissions"
Click "Anonymous Access" from the ribbon
Check off "View Items" and click "OK"

After performing the above steps anonymous users were able to get access to profile pictures of other users.

Senthil S