I just saw something. C # articles Get more information about the current user's use of the Web service.
Without writing any code, you can achieve exactly the same result. So here's a brief introduction:
* If you are already familiar with this, this article can be skipped.
* This presentation is based on InfoPath and InfoPath Forms services.
- Use InfoPath to open Tools > Data Connections and Click "Add ..." to add a new form of data connection. This opens the Data Connection Wizard.
- We want to pick up data about the current user, so select Receive data, and then click Next.
- Select the SOAP Web service.
- Http://ServerName/_vti_bin/UserProfileService.asmx Type the address , and then click Next.
- Select Getuserprofilebyname , and then click Next.
- In this screen you can specify what parameters are sent in the method, we choose here to click Next .
- Click Next and make sure that the data is automatically retrieved when the form is checked for opening .
- Complete the wizard.
The Getprofilebyname method returns a propertydata. You can think of it as a repeating table name and value, so now that you have a data connection, you can get the value of the current user that you can use it. In this example, I will display the user's name in a text box.
1. Add a text box
2. Double-click the text box, properties, and clicking the "FX" button.
3. Click "Insert field or group"
4. Select Getuserprofilebyname at the data source.
6. Expand the data domain Group under all groups, and select the Value field, and do not click OK!!!
7. Click "Filter Data" and select "Name" = "Preferredname" in the first drop-down value, where preferredname refers to the full name. Of course, we have to fill in according to your actual situation, for example: "Userprofile_guid,accountname,firstname,lastname,preferredname,workphone,office,department"
Finally, come to Zhang:
Note:
Here is a complete list of the default profile properties that get returned by Userprofileservice.
Userprofile_guid
AccountName
FirstName
LastName
Preferredname
Workphone
Office
Department
Title
Manager
Aboutme
Personalspace
Pictureurl
UserName
Quicklinks
WebSite
Publicsiteredirect
Sps-dotted-line
Sps-peers
Sps-responsibility
Sps-skills
Sps-pastprojects
Sps-interests
Sps-school
Sps-sipaddress
Sps-birthday
Sps-mysiteupgrade
Sps-dontsuggestlist
Sps-proxyaddresses
Sps-hiredate
sps-lastcolleagueadded
Sps-owaurl
Sps-resourceaccountname
Sps-masteraccountname
Assistant
Workemail
CellPhone
Fax
HomePhone
The above fields can be
Central Administration Profile Services: User Profiles Service Application-Manage user attributes for
Infopath 2013 reads ad user information through Userprofileservice