private void SetUser(UserProfile userProfile) { try { if (userProfile != null && UserProxy != null) { UserProxy.SetUserProfile(userProfile, _localSharesList, _serverSharesList); } else { UserProxy?.Clear(); } IsUserSelected = userProfile != null; IsSystemUserSelected = userProfile?.ProfileType == UserProfileType.ClientProfile; IsRestrictedToOwn = CheckRestrictedToOwn(); ProfileTypeName = userProfile != null?LocalizationHelper.Translate("[UserConfig." + userProfile.ProfileType + "]") : string.Empty; SetSelectedShares(); SetSelectedRestrictionGroups(); } catch (Exception e) { ServiceRegistration.Get <ILogger>().Error("UserConfigModel: Error selecting user", e); } }
private void SetUser(UserProfile userProfile) { try { if (userProfile != null && UserProxy != null) { UserProxy.SetUserProfile(userProfile); } else { UserProxy?.Clear(); } IsUserSelected = userProfile != null; IsRestrictedToOwn = CheckRestrictedToOwn(); } catch (Exception e) { ServiceRegistration.Get <ILogger>().Error("UserLanguageModel: Error selecting user", e); } }