Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
546 views
in Themes by
How can I display the logged in user name in a template?

Example:

$this->output('<div>Welcome USERNAME you are logged in!</div>');
Q2A version: 1.6.3

1 Answer

+1 vote
by
selected by
 
Best answer

Search all the code for "handle" instead of "username" and you find your desired functions. E.g.:

$username = qa_get_logged_in_handle();

if(isset($username)) {

   $this->output('<div>Welcome '.$username.' you are logged in!</div>');

}

...