protected void Page_Load(object sender, EventArgs e) { SharedBasePage page = this.Page as SharedBasePage; if (!page.SiteConfig.EnableStartPageCaching) { UserCollection users = SiteSecurity.GetSecurity().Users; if (users != null && users.Count > 0) { listProfiles.Items.Add(new ListItem("(select)", string.Empty)); users.Sort(new UserSorter()); foreach (User user in users) { string profileName = string.Empty; if (user.DisplayName != null && user.DisplayName.Length > 0) { profileName = user.DisplayName; } else { profileName = user.Name; } listProfiles.Items.Add(new ListItem(profileName, user.Name)); } } else { this.Visible = false; } } else { this.Visible = false; } listProfiles.SelectedValue = string.Empty; }
private object[] ComposeMailForUsers(Entry entry, Comment c) { List <object> actions = new List <object>(); foreach (User user in SiteSecurity.GetSecurity().Users) { if (user.EmailAddress == null || user.EmailAddress.Length == 0) { continue; } if (user.NotifyOnAllComment || (user.NotifyOnOwnComment && entry.Author.ToUpper() == user.Name.ToUpper())) { SendMailInfo sendMailInfo = ComposeMail(c); sendMailInfo.Message.To.Add(user.EmailAddress); actions.Add(sendMailInfo); } } return(actions.ToArray()); }