如何向活动目录中的用户添加图像?

发布于 2024-11-29 11:03:17 字数 130 浏览 1 评论 0原文

我有一个自定义列表,其中有一列作为员工,在 sharepoint 2010 中其数据类型为“人员或组”。现在我想要员工的 peplepicker 框中的用户图片。我怎样才能做到这一点。

我还想知道如何将图像添加到活动目录中的用户。

I have a custom list in which there is one column as employee which has datatype as 'person or group' in sharepoint 2010. now i want the picture of users in peaplepicker box of employee. How can i do this.

Also i want to know how to add image to a user in active directory.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

变身佩奇 2024-12-06 11:03:17

您的问题有两个方面,首先将图像添加到个人资料中,因为您必须使用他的图片更新共享点或活动目录中的用户个人资料。
第二部分你想用人物选择器显示一个人的图像。为此,您必须创建一个自定义人员选择器,按照下面文章中提供的代码创建自定义人员选择器字段类型
1.这篇文章将提供如何自定义人员选择器的帮助
http://panvega.wordpress.com/2008/02/ 22/custom-sharepoint-people-picker/
2.这篇文章将提供创建新字段类型的帮助
http ://www.alectang.com/blog/archive/2009/11/23/creating-custom-field-type-in​​-sharepoint-list-50.aspx

Thier are two aspects of your problem first to add images to profile for that you would have to update users profile in sharepoint or active directory with his pictures.
second part where you want to show image of a person with people picker. for this you would have to create a custom people picker follow the code provided in article below to create custom people picker field type
1. this post will provide help how to customize people picker
http://panvega.wordpress.com/2008/02/22/custom-sharepoint-people-picker/
2. this post will provide help to create new field type
http://www.alectang.com/blog/archive/2009/11/23/creating-custom-field-type-in-sharepoint-list-50.aspx

花心好男孩 2024-12-06 11:03:17

sharepoint 是否使用thumbnailphoto/jpegPhoto 属性?

如果是这样,您可以使用 powershell 更新映像文件。 (TechNet 论坛

[byte[]]$jpg = Get-Content c:\photo.jpg -encoding byte
$user = [adsi]"LDAP://cn=user1,cn=users,dc=domain,dc=loc"
$user.Properties["jpegPhoto"].Clear()
$null = $user.Properties["jpegPhoto"].Add($jpg)
$user.CommitChanges()

Does sharepoint use the thumbnailphoto/jpegPhoto attribute?

If it does you can use powershell to update the image file. (TechNet Forums)

[byte[]]$jpg = Get-Content c:\photo.jpg -encoding byte
$user = [adsi]"LDAP://cn=user1,cn=users,dc=domain,dc=loc"
$user.Properties["jpegPhoto"].Clear()
$null = $user.Properties["jpegPhoto"].Add($jpg)
$user.CommitChanges()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文