DWUsers:User:Username

Version: -  

Summary

Returns the username of an extranet/intranet user or an administrator user.

Settings

The value is based on the User name input field in the User details section for the user.

(Users tab > Group/User > User tab > User details panel > User name)

Examples

Outputting the template tag

@GetObject("DWUsers:User:Username")

Check if tag has a value

@if(!var.IsNullOrWhiteSpace(GetObject("DWUsers:User:Username"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ var storedTag = GetObject("DWUsers:User:Username"); }

Outputting the template tag

<!--@DWUsers:User:Username-->

Check if object has a value

<!--@If Defined(@DWUsers:User:Username)--> Let's output this tag here: <strong><!--@DWUsers:User:Username--></strong> <!--@EndIf(@DWUsers:User:Username)-->