•  CoreyRi1
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
Here's my problem:

I've integrated membership and role providers from another .net solution (dashcommerce). Integrated successfully...users are added to the yaf_User table whenever they sign in to YAF for the first time however they are not added to the yaf_UserGroup table for some basically, duplicate user accounts are automatically created, however they have no permissions by default, which means that they can't even view any forums. I can go into the admin panel for the forum and manually register each user under a group, but this obviously needs to be done automatically at some point.


Would this solution posted by MSUArrowCS work?


Hi ..

I experienced this issue on an integration effort. I am pretty sure the root cause has something to do with the Membership provider on the original (non-YAF) site, but I cannot verify that. Regardless, my workaround was to call some YAF registration methods from my original site's registration. I had a CreateUserWizard control and caught the CreateUser event. I did the account setup for my site and then called the following:


MembershipUser oUser = Membership.GetUser(username);
if (oUser != null && oUser.IsApproved == false)
oUser.IsApproved = true;

/* Add the user as a YAF user also ... from YAF's Registration Code */
MembershipUser user = Membership.GetUser(username);

// [YAF] setup inital roles (if any) for this user
RoleMembershipHelper.SetupUserRoles(YafContext.Current.PageBoardID, username);

// create the user in the YAF DB as well as sync roles...
int userID = RoleMembershipHelper.CreateForumUser(user,

The caveat to this is that since it probably means YAF and your site's membership profile aren't getting along, some of the YAF controls, like registration and changing password, won't affect your 'main' login info ... but in my site, this was not a concern - I want my users using my original controls for login/logout/register, etc.


If so, could I use this even though dashcommerce and YAF are in two separate directories? Or is there some easier/alternate solution to this problem?

Thanks!:) Any help with this would be hugely appreciated as finding a solution is somewhat urgent (working with a client).
  •  CoreyRi1
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
Has anyone else run in to this problem? Any solutions? Just want to figure out the best work-around for this issue...

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