Umbraco: How to check whether user allready exist with given user name in umbraco by c#.

We use .Net Membership class for check whether user exist by given user name or not.


//Gets the information from the umbraco data source for the specified membership user.
MembershipUser userInfo = Membership.GetUser(userName);
if (userInfo != null)
{
   //User exist 
}
else
{
   //User doesn't exist 
}
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