Mono Support Return User Name 

Viewed 12044 time(s), 3 post(s), 11/8/2014 8:05:09 PM - by Samtg
11/8/2014 8:05:10 PM
440 Reputation 38 Total posts

Hi,
     I was wondering, what is a good method to return the current username in the MonoX architecture?  I think I know of some ways to do it, but unsure if it will work.

Thanks.

1
11/10/2014 8:20:15 AM
3016 Reputation 428 Total posts

Hi,

are you referring to the current logged user? If that's the case you can use code snippet below:

MonoSoftware.MonoX.Utilities.SecurityUtility.GetUserName()
Regards.

2
11/10/2014 8:47:43 AM
15993 Reputation 2214 Total posts

Hi,

you can get user details by using "SecurityUtility.GetUser()" it will return the MembershipUser which contains username property. This approach is optimized and secure.

Regards

3
This is a demo site for MonoX. Please visit Mono Software for more info.