SharePoint 2010 Добавление большего количества полей в профиле пользователя, доступных из Spuser

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/41210

Вопрос

У нас есть пользовательские поля, такие как E.G.Менеджер, Организация, Сотрудничество. В настоящее время мы создаем пользовательский список, чтобы добавить их с соответствующим SPUSER.ID, который, я думаю, неверно.

Может ли кто-нибудь, пожалуйста, проведите меня, как добавить эту колонку, чтобы они были доступны от объекта Spuser?

Большое спасибо заранее ...

Это было полезно?

Решение

Salman,

If I recall correctly, you cannot use SPUser to directly access extended properties. However, the User Information List (UIL) is just a regular list, almost like any other, so the user data of an SPUser is also exposed as a regular SPListItem object. If you add columns to the UIL you can access the extended properties through the associated SPListItem.

Here's a brief article I wrote a few years back that shows how: http://blog.furuknap.net/sharepoint-user-information-list-extensions

.b

Другие советы

Are you using SharePoint foundation or Server? Do you have the user profile service application provisioned?

When you use profiles the extra information is stored against the user profile object. You can define custom properties against the profiles and you have a profile object per user.

If on foundation or server without user profiles then all the user info is stored in a hidden user information list, theoretically you could add fields to this list and access the data although I am not sure how supported this would be.

See this blog post for more info on that list:-

http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top