$isAuthenticated = $modx->user->hasSessionContext('mgr'); if($isAuthenticated == true) { echo $modx->getChunk('footerCode'); };