Get current login user username in umbraco.

For getting current login user information you have to do following steps.

Step 1: First reference below dll
using umbraco.cms.businesslogic.member;
using System.Web.Security;

Step: 2 write this piece of code
Member memberInfo = Member.GetCurrentMember();

Step: 3 Use following property to retrive login name.
string currUserLoginName = memberInfo.LoginName;

Note: by using another property of memberInfo object you can retrive another information like password, id and many things.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s