JohnFlyTN
  •  JohnFlyTN
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2009-02-10T08:28:58Z
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
2009-02-10T19:00:33Z
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

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved