From reading a bunch of posts here, it seems like this is a pretty typical question, but I haven't found a good solution yet. I *think* I know how to go about this, but I was hoping that someone could confirm that I am on the correct path and lmk how (if it's possible) to log a user into the YAF boards programatically and also create YAF users programatically.
Like many others, I would like users of my website to be automatically logged into YAF when they login to the website.
Here is my basic setup:
Validation occurs against ActiveDirectory that is off site.
If successful, the user information is stored as a Session variable
There are no .Net Membership or Profile providers in use.
I am working inside a pre-existing framework, and I cannot change the way validation occurs.
Here is what I think I need to do in YAF if I understand correctly:
All of this is, of course, assuming that the user has been logged in via ActiveDirectory - if they are not, they will be kicked back to the main login page, so any user attempting to access YAF will have Session variables populated.
- Attempt to validate the Session["username"] as a YAF user.
- If no YAF user matches the Session user, create a new YAF user and log that user in
Perhaps I should be asking, instead, if it's possible to modify YAF to utilize Session variables for tracking posts, etc instead of requiring the database login.
Sorry if that question sounds just really stupid or confusing. Any help (or links!) would be greatly appreciated.
(or if I should be looking at a completely different open source solution, I'm down with that as well... although I'd like to stay with YAF. Currently installed 1.90)