Jump to main content Jump to doc navigation

modX::getLoginUserID

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

Syntax

API Doc: modX::getLoginUserID()

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

Example

Get the current login user ID for the 'sports' context.

$id = $modx->getLoginUserID('sports');

See Also