This question has been answered by multiple community members. See the first response.
if ($modx->user->isMember('Administrator')) {
$modx->regClientCSS('path/to/css/file');
}
return '';I would try a snippet in the Template:
if ($modx->user->isMember('Administrator')) { $modx->regClientCSS('path/to/css/file'); } return '';
That will inject the CSS at the end of the head section where it will override any previous CSS file.
They do almost the same job. Mark's snippet uses hasSessionContext('mgr'), so it will detect anyone who is logged into the mgr context (Administrator group member or not), but not someone who is testing the front-end without logging in to the Manager. Which one would be better depends on the specific use case.