Tuesday, September 18, 2012

Getting Current User Info in DotNetNuke

// DNN Get Current User


// The Current user information can fetch using UserController and
// is availble as UserInfo object:
 

 private UserInfo _currentUser =
                   DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();

// To get UserID of the current user we can then access the fetched UserInfo object:

 int UserID = _currentUser.UserID

1 comment:

Unknown said...

Hi Vishwajit,

Nice Post,thanks for sharing this information.Looking forward for more posts like this.

Dotnetnuke developers