Jump to main content Jump to doc navigation

modX.getLoginUserName

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

modX::getLoginUserName

Returns the current user name, for the current or specified context.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modx.class.html#%5CmodX::getLoginUserName()

string getLoginUserName ([string $context = ''])

Example

Grab the user's username in the current Context.

$username = $modx->getLoginUserName();

See Also