// check if user exists in database public static bool UserExists(string userName) { var q = new QueryUserRecord(userName); var d = q.Execute(); return(d != null); }
// return original username public static string OriginalUsername(string userName) { if (!String.IsNullOrEmpty(userName)) { var q = new QueryUserRecord(userName); var d = q.Execute(); return(d != null ? d.UserName : null); } return(null); }