Get K2 Login User

  • 12 October 2005
  • 2 replies
  • 3 views

Badge
Can u tell me how to grab K2 login User in asp.net??pls........Thanks.

2 replies

Badge +9
Hi,

One way of doing this is to make sure the site is configured to run under Windows Authentication, open a connection to K2.net Server making use of K2ROM

Dim oK2Connection As New K2ROM.Connection 

oK2Connection.Open(k2Server)
response.write(oK2Connection.User)


The User Property of the Connection object will return the current logged on users name DomainUserName
Badge +2
Hi,

If you want to see who is logged on to the current K2 ASP.Net page (site runs under Windows Authentication) you can also use:

Page.User.Identity.Name

This code will return the current logged on user's DomainUsername

T

Reply