Beispiel #1
0
        /// <summary>
        /// Create a new group
        /// </summary>
        public bool Create(string name, string creator, int asstID,
            ArrayList invites)
        {
            //TODO: Validate group parameters
            //Create the group
            Group group = new Group();
            group.Name = name;
            group.Creator = creator;
            group.AsstID = asstID;
            m_dp.CreateGroup(group);

            //Invite everyone
            foreach (string username in invites) {
                //TODO: Validate invitation validity

                new EmailWizard(m_ident).SendByUsername(username, "FrontDesk: Invitation Notification",
                    String.Format("Dear User,\n\nThis email is to inform you that user {0} has invited you " +
                    "to join group {1}. Log into FrontDesk in order to accept or decline this " +
                    "invitation.\n\nPlease do not respond to this email.", creator, name));

                m_dp.InviteUser(username, Globals.CurrentUserName, group.PrincipalID);
            }

            return true;
        }
Beispiel #2
0
        protected string GetGroupMembers(Group group)
        {
            User.UserList users = new Groups(Globals.CurrentIdentity).GetMembership(group.PrincipalID);
            string ulist=String.Empty;

            foreach (User user in users)
                ulist += user.UserName + " ";

            return ulist;
        }