SPWeb web = properties.OpenWeb(); web.AllowUnsafeUpdates = true; SPList list = web.Lists["Távollétek"]; SPListItem item = properties.ListItem; SPSite site = new SPSite("http://sp2010/sites/demo"); SPWeb kezdo = site.OpenWeb(); SPList felhasznalok = kezdo.Lists["User Information list"]; string userReszleg = string.Empty; string nev = item["Name"].ToString(); foreach (SPListItem felList in felhasznalok.Items) { if (nev == felList["Name"].ToString()) { userReszleg = felList["Department"].ToString(); } } item["Department"] = userReszleg.ToString(); item.Update(); this.EventFiringEnabled = true;
SharePoint User Profiles - Internal Names
1. WSS Profile - can be accessed from Welcome User > My Settings page (_layouts/userdisp.aspx?.......)
User Information List
| |
Display Name
|
Internal Name
|
Account | Name |
First name | FirstName |
Last name | LastName |
Name | Title |
Work phone | WorkPhone |
Office | Office |
Department | Department |
Title | JobTitle |
Work e-mail | |
User name | UserName |
2. MOSS profile - can be accessed from My Site (../Person.aspx?....). The MOSS profiles are created when users are imported into the system from AD or LDAP.
SSP User Profile
| |
Display Name
|
Internal Name
|
Account name | AccountName |
First name | FirstName |
Last name | LastName |
Name | PreferredName |
Work phone | WorkPhone |
Office | Office |
Department | Department |
Title | Title |
Work e-mail | WorkEmail |
Basically, there are two MOSS Timer jobs that control the replication of the user profiles per web application. These jobs can be found from Central Administration -> Operations -> Timer Job definitions.
1. Profile Synchronization - updates the WSS profiles.
2. Quick Profile Synchronization - updates the MOSS profiles.
No comments:
Post a Comment