YAFLogo

ThisBytes5
  • ThisBytes5
  • 54.4% (Neutral)
  • YAF Forumling Topic Starter
6 years ago
I found the post below, but given it's age I'm wondering if it will still work, does anyone know if it's still valid?

http://www.yetanotherforum.net/forum/posts/t10180-Integrating-YAF-with-ASP--Net-membership---My-Solution 

I have what I need for creating the user, figured that out by lots of trial and error, but haven't been able to figure out the login process.

Any assistance would be greatly appreciated.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
6 years ago
here is a sample on how to login a user

 FormsAuthentication.SetAuthCookie(userName, true);

            YafContext.Current.Get<IRaiseEvent>().Raise(new SuccessfulUserLoginEvent(userID));

of course first you need to get first the username and the user id.

if you need more help let me know.

ThisBytes5
  • ThisBytes5
  • 54.4% (Neutral)
  • YAF Forumling Topic Starter
6 years ago
I finally got the post above working rather late last night, and with sleep/work/kids this is the first time I've been able to check status of the question. I appreciate the feedback. Once done with what I have going on I'll go back and reply to the post with my changes as I had to tweak it a bit, probably due to the age of the post and the fact that my back end is making the login call, so I had to pass some cookies around.

Now off to publish the forum, get it on my prod server, and read docs/figure out how to re-skin it!

Over all I'm pretty happy with the way the setup and customization has gone, taken a while, but if I had to do it again it would be quick.

Wayne