YAFLogo

JohnFlyTN
  • JohnFlyTN
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I integrated YAF into my main membership provider using 1.9.3..

Everything seems to be going well except that users that create accounts through my main site do not get the "Registered" Role.

Is there an easy way to ensure members get setup with this role? I was thinking about a DB trigger on the yaf_User table to automatically enter them into the yaf_UserGroup table with this role.

Any thoughts otherwise?

(EDIT : Incase anyone wants to check it out its at www.geekhealth.org/forums)

Sponsor

JohnFlyTN
  • JohnFlyTN
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I created this stored Proc, hope it works as expected...

Create TRIGGER [dbo].[register_yafUser]

ON [dbo].[yaf_user]

AFTER INSERT

AS

Declare @UserID int;

Select @UserID = [UserID] from Inserted;

BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from

-- interfering with SELECT statements.

SET NOCOUNT ON;

insert into yaf_UserGroup (UserID, GroupID) values (@UserID, 3);

-- Insert statements for trigger here

END