Esempio n. 1
0
 public LoginViewModel(ApplicationSettings settings, /* IEnumerable<IAuthenticationProvider> configuredProviders, */ IEnumerable <ChatUserIdentity> userIdentities)
 {
     SocialDetails          = new SocialLoginViewModel(/*configuredProviders,*/ userIdentities);
     AllowUserRegistration  = settings.AllowUserRegistration;
     AllowUserResetPassword = settings.AllowUserResetPassword;
     HasEmailSender         = !string.IsNullOrWhiteSpace(settings.EmailSender);
 }
Esempio n. 2
0
 public ProfilePageViewModel(ChatUser user /*, IEnumerable<IAuthenticationProvider> configuredProviders*/)
 {
     Name = user.Name;
     Hash = user.Hash;
     //Active = user.Status == (int)UserStatus.Active;
     //Status = ((UserStatus)user.Status).ToString();
     Note    = user.Note;
     AfkNote = user.AfkNote;
     IsAfk   = user.IsAfk;
     Flag    = user.Flag;
     //Country = ChatService.GetCountry(user.Flag);
     LastActivity  = user.LastActivity;
     IsAdmin       = user.IsAdmin;
     SocialDetails = new SocialLoginViewModel(/*configuredProviders, */ user.ChatUserIdentities);
     //HasPassword = user.HasUserNameAndPasswordCredentials();
     OwnedRooms = user.OwnedRooms.Select(r => r.ChatRoomKeyNavigation).OrderBy(e => e.Name).ToArray();
 }