modX::getLoginUserName
Returns the current user name, for the current or specified context.
Syntax
API Doc: http://api.modxcms.com/modx/modX.html#getLoginUserName
string getLoginUserName ([string $context = ''])
Example
Grab the user's username in the current Context.
$username = $modx->getLoginUserName();