Ejemplo n.º 1
0
        public static void Adds(Int32 fid, String moderators, int displayorder, int inherited)
        {
            var entity = new Moderator();

            entity.Fid          = fid;
            entity.DisplayOrder = displayorder;
            entity.Inherited    = inherited;

            foreach (var item in moderators.Split(","))
            {
                var user = User.FindByName(item);
                if (user != null)
                {
                    entity.Uid = 0;

                    entity.Insert();
                }
            }
        }