-- ========================================================================================== -- Author: Marc Huijbregts -- Create date: 05-31-2011 -- Description: This trigger automaticaly moderates users when they are in -- specific DNN role(s). This means that you can consider these users as "Trusted -- users", just like the feature in Ultra News Article. Please check out the -- following thread on the BizModules forum for comments of Pengtsen on this matter: -- http://www.bizmodules.net/Support/tabid/55/forumid/13/postid/23895/view/topic/Default.aspx -- ========================================================================================== SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER UVG_TrustedUsers_Custom ON UVG_Video AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here UPDATE UVG_Video SET Approved = 1 WHERE CreatedByUser in ( SELECT UVG_Video.CreatedByUser FROM UVG_Video INNER JOIN UserRoles ON UVG_Video.CreatedByUser = UserRoles.UserID Where UserRoles.RoleID = "Place your DNN role Id over here" ) END GO