user.username

Previous page  First page  Next page

user.username is a string variable containing the username of the currently logged-in reader. This is empty if the reader is not logged in.

 

It can also be used as a boolean variable; it is true if it contains a value.

 

The username is the name that readers use to log in. Usernames are case-insensitive and all uppercase characters are converted to lowercase.

 

 

Example

 

The example below displays the text Welcome to my blog, followed by the reader's username if the reader is logged in:

 

{{if user.username}}

Welcome to my blog, {{user.username}}

{{/if}}