modX.getUser

Skip to end of metadata
Go to start of metadata


modX::getUser

Get the current authenticated User and assigns it to the modX instance.

Syntax

API Doc: http://api.modxcms.com/modx/modX.html#getUser

modUser getUser ([string $contextKey = ''])

Example

Get the current auth'ed user and print out its username.

$user = $modx->getUser();
echo $user->get('username');

See Also

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.