YAFLogo

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
19 days ago
Since I am not that conversant in c# ... what lines should I add to the site.master.cs to get the membership name and number as session variables?
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
18 days ago
you can get the username via

​if (Context.User.Identity.IsAuthenticated)
    {
     var username = Context.User.Identity.Name
    }

do you mean with user number the user id?

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
18 days ago

you can get the username via

​if (Context.User.Identity.IsAuthenticated)
    {
     var username = Context.User.Identity.Name
    }

do you mean with user number the user id?

Originally Posted by: tha_watcha 

Yes, please. But they also have to be stored as session variables.

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
18 days ago
NVM ... I figured it out. Thanks!