• Posts: 12
  • Joined: 23/07/2008

I am trying to integrate YAF into another web application. Given that my app is smaller and less complicated than YAF, I'm hoping to use YAF's Users/Memberships/Roles instead of creating my own. But in order to do this, I need to add a couple of fields for each user and I'm not sure the best place to keep the information.

At first I was thinking about keeping it on the yaf_User table but having looked at the code I'm now leaning more towards the yaf_prov_Membership table. Can someone help me better understand the difference between the two and why I might want to store information on one versus the other?

Any help would be greatly appreciated!

  • Posts: 2544
  • Joined: 09/10/2004
Keep it in membership profile by just adding a new field in the profile configuration in the web.config.

  • Posts: 12
  • Joined: 23/07/2008

Thanks, I'll give it a shot.

  • Posts: 4
  • Joined: 04/09/2008
I really want to understand the different between 'yaf_User' and 'yaf_prov_Membership' tables. Can anybody give me an explanation.

Thanks in advance.
  • Posts: 14
  • Joined: 26/09/2008
bkp wrote:

I really want to understand the different between 'yaf_User' and 'yaf_prov_Membership' tables. Can anybody give me an explanation.

Thanks in advance.

Did you ever get an answer to this? if so, can you share?
  • Posts: 12
  • Joined: 23/07/2008
Well, I never got a real explanation but this is what I _think_ I have figured it out. Please keep in mind that this is reasoned from my tinkering with the code and not from any documentation or word from the YAF team. Also, I'm not currently sitting at the machine that I have been using to work on the YAF implementation so I won't be able to pull too many detailed examples for you at the moment. That being said:

The yaf_User table seems to have information about a generic user to the site, who may or may not be a member of the Forum. It also looks to me like a holdover from a previous implementation. There is some clear duplication of data between the two tables and I'm not sure anyone would have coded it that way from scratch. (YAF developers, please feel free to correct me on ANY of this)

The yaf_prov_Membership table seems to hold information regarding people who are registered and are/were members of the forum. In theory you could have a User who is not a Member but you would never have a Member without having a corresponding User entry.

It's my belief that this yaf_prov_Membership table was added relatively recently along with some other related tables to leverage .Net's native profile/membership/login capabilities. You'll notice some other tables with the yaf_prov_ prefix. Take a look Jaben's suggestion above to use the web.config file to add additional fields. The site he links to is a generic .Net reference and not a YAF one. So what the Dev team appears to be trying to do is replace the old custom User/Login capabilities with one that is more closely tied into the native .Net profile. At least that is my guess.

I don't know if I've answered the root of your question but hopefully it helps.


(BTW: I ended up solving my problem in a different way than as advised by Jaben. It may not be the cleanest way, but it works for me)
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    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