Yetanotherforum basic integration onto website

420 views Asked by At

I've got the forum setup on my ASP.net website fine, works great!

I want to use their membership system as my central user system on my site though.

I basically want to be able to tell if a user is logged in or not. IE, best case scenario, on my custom Master page I just have a:

if(UserIsLoggedIn){
    Response.Write(LoggedInUserName);
}

Don't really know how to go about getting that though!

2

There are 2 answers

3
Jaben On BEST ANSWER

YAF.NET uses well documented ASP.NET membership.

Try:

var user = Membership.GetUser();

if (user != null)
{
   // user is logged in...
   Response.Write(user.UserName);
}
1
Marko On

What's the error?

P.S. It's Response.Write(), capitalized.