Exemple #1
0
        /// <summary>
        /// Determines whether the given user is a member of the given list.
        /// </summary>
        /// <param name="emailListId">The list to check</param>
        /// <param name="email">The email address to check for list membership</param>
        /// <returns>True if the user is a member of the list; false otherwise.</returns>
        public static bool IsMember(int emailListId, string email)
        {
            string        loweredEmail = email.ToLowerInvariant();
            EmailListUser elu          = EmailListUserDataSource.Load(emailListId, loweredEmail);

            return(elu != null);
        }
Exemple #2
0
        /// <summary>
        /// Removes the member from the list
        /// </summary>
        /// <param name="emailListId">The list to remove the member from</param>
        /// <param name="email">The email address to remove from list membership</param>
        public static EmailListUser RemoveMember(int emailListId, string email)
        {
            string        loweredEmail = email.ToLowerInvariant();
            EmailListUser elu          = EmailListUserDataSource.Load(emailListId, loweredEmail);

            if (elu != null)
            {
                elu.Delete();
            }
            return(elu);
        }