on 05-24-2006 3:14 PM
Hi ,all
I use the .net portal sdk to create some iViews in portal now. I can use this code to get user name:
" this.Label1.Text = this.User.Identity.Name "
But I don't know how to get the department of the user.
how to do ?thanks
Hi,
You need to use the UserManagment service.
See <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/Programming%20with%20PDK%20for%20.NET/Working%20with%20Portal%20Components%20and%20Services/Accessing%20Portal%20Services.htm">this</a> on how to use services in the PDK.
So the create a UserManagment object, and use the GetUser method to get the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/Reference/SAP.Portal.Services.UserManagement.UserInfo.html">UserInfo</a> object of this user. This has a "Department" property.
Regards,
Ofer
Message was edited by: Ofer Feldman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.