NetTalk Central

Author Topic: User Name in HEader  (Read 2677 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
User Name in HEader
« on: March 02, 2014, 05:19:03 PM »
Hi, how do I put the Username that was used in the Login form and put it in the main header?
Or anywhere the user who is logged in can see it.

Brian.
Brian

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: User Name in HEader
« Reply #1 on: March 02, 2014, 10:39:24 PM »
Store it in a session variable and you can use it anywhere: p_web.SetSessionVariable('username',UserName).

In a header use 'Logged-in user: ' & p_web.GetSessionVariable('username') or create a routine and use <!-- Net:s:username --> on the xHtml tab.

Peter

Correction: it should read Set/GetSessionValue - not variable. Or shorthand ssv/gsv.
Peter
« Last Edit: March 02, 2014, 10:54:33 PM by peterH »