UserFactoryFindByGuid Method |
Namespace: AskiaPortalCmn
Find the user with his guid
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var user = UserFactory.FindByGuid(context, Guid.Parse("F3204BAF-A937-4EBA-AC8F-8FF0CC3D32C4")); if (user != null) { Console.WriteLine("User Guid={0} was found: {1}", user.Guid, user.Login); } else { Console.WriteLine("The specified user doesn't exist, or the current user within the context could not access it"); }