예제 #1
0
 public void Update(AuthenticationType authenticationType, User user)
 {
     UserId         = user.Id;
     UserLevel      = user.Level;
     UserDebugLevel = user.DebugLevel;
     //SimplifiedGui = user.SimplifiedGui;
     UserCaption            = user.Caption;
     UserTimeZone           = user.TimeZone;
     PasswordExpired        = user.PasswordExpired;
     ExternalUsername       = user.Username;
     NeedsEmailConfirmation = user.NeedsEmailConfirmation;
     if (authenticationType != null)
     {
         if (AllAuthenticationTypes == null)
         {
             AllAuthenticationTypes = new List <AuthenticationType>();
         }
         if (!AllAuthenticationTypes.Contains(authenticationType))
         {
             AllAuthenticationTypes.Add(authenticationType);
         }
     }
 }
예제 #2
0
        //---------------------------------------------------------------------------------------------------------------------

        public static bool DoesUserExist(IfyContext context, string username, AuthenticationType authenticationType)
        {
            return(GetUserId(context, username, authenticationType) != 0);
        }