YAFLogo

rtwPhoenix
  • rtwPhoenix
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Will the program be modified to work with .net Membership utilizing a Single Sign On and not make the logged on user a guest in the Forum?
Sponsor
rmcbride@rama.com
15 years ago
Hi rtwPhoenix

YAF already works this way in version 1.9.3. Check out the Integration section for more comments and information.

Thanks

Richard

mhardy
  • mhardy
  • 51.8% (Neutral)
  • YAF Forumling
15 years ago
However with the current approach isn't it true that you need to maintain two user databases? I find this to be a rather poor integration option. I'm currently considering integrating YAF into another site and was able to actually get it running (not usable, but logging in and submitting posts) using the standard SqlXXXProviders the site currently uses.

Unfortunately there's a lot that doesn't work so it's unusable at this point.

So my question is this (bare with me, I don't really know the YAF architecture)...

Would it be possible to simplify the providers so they do just the basics. Log someone in, determine if they're in a role, etc. Extract YAF specific implementations from the providers into a different mechanism so we can drop in YAF and use the providers the site is already using.

Maintaining and keeping in sync two databases in a production environment is not only less than desirable, but not even an option in some cases.

This is an awesome product, we just need to find a better means of integration.

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
The answer to the above is yes; and no.

:-)

Yes there is two user tables; the membership table being used for authentication. The yaf_users table (which doesn't carry password blah blah), this is to provide the numerous sql joins etc needed. Using GetUser in a forum repeater for the topics postsed would be very slow.

The providers are not a perfect fit for bigger solutions; perfect though for quick apps.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

mhardy
  • mhardy
  • 51.8% (Neutral)
  • YAF Forumling
15 years ago
OK, so in theory I should be able to get this working by letting my provider handle authentication using my current aspnet_User/Membership tables. Call yaf.DB.user_register() on login if necessary with a dummy password, and let my original provider handle password changes, etc. Basically just create a big yaf junction table for your joins and such while handling profile management myself.

Does that sound reasonable/possible?

Thanks-

Mike

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
No need to; YAF 1.93 auto syncs with your provider. So your users and roles will be carried through. So no need to use a dummy password. Just use the membership as you would.

One possible fly in the ointment seems to be we don't sync actual role membership i.e. this user belongs to that group. Which has been highlighted in another thread; I'll have to step through if we're trying to add the user to the IsStart YAF group to give them some user permissions instead.

But the point still stands you've got less work to do.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

mhardy
  • mhardy
  • 51.8% (Neutral)
  • YAF Forumling
15 years ago
OK! Got it. Initial confusion as the Wiki is still pointing to this page:

http://wiki.yetanotherforum.net/AspNetMembershipIntegration.ashx 

which talks about handling the login, creating users, etc.

Instead of those instructions here's what I did that worked perfectly.

(came across "YAF in sub-directory.txt" which helped - that file should replace the one on the wiki)

- created directory /forum/ off main site

- NOT as an application

- moved App_Code and /bin back to main site

- set YAF.Root to /form in app.config

- set YAF.BaseUrl to ~/forum in app.config

- commented out providers in YAF web.config

- commented out in YAF web.config

- created a SqlRoleProvider in main site web.config b/c I didn't yet have a Role provider

- added inherits="YAF.Classes.Utils.YafUserProfile" to my Profile provider

- Changed default.aspx to use main sites MasterPage

Everything works perfect!

Zinkmo finally has a forum !

Thanks a mil Mek-

Mike

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
Yeah; embarassingly I can't login to to the wiki atm to sort what we got out.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )