Check if member exist Umbraco C#

To check if a user exist in the Umbraco membership section, we use the ASP.NET Membership API.

[csharp]
var userName = "myUserName";
var memberExist = false;

if(Membership.GetUser(userName) != null)
{
memberExist = true;
}
[/csharp]