Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to display the username in a template

0 votes
asked Mar 31, 2014 in Themes by Geoff
How can I display the logged in user name in a template?


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

1 Answer

+1 vote
answered Mar 31, 2014 by q2apro
selected Mar 31, 2014 by Geoff
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>');