$modx->getUser($modx->context->key); } } if ($modx->user->isAuthenticated($modx->context->key)) { if (!$modx->user->active || $modx->user->Profile->blocked) { $modx->runProcessor('security/logout'); $modx->sendRedirect($modx->makeUrl($modx->getOption('site_start'), '', '', 'full')); } } if (!empty($_REQUEST['hauth_action']) || !empty($_REQUEST['hauth_start']) || !empty($_REQUEST['hauth_done'])) { $config = !empty($_SESSION['HybridAuth'][$modx->context->key]) ? $_SESSION['HybridAuth'][$modx->context->key] : array(); $HybridAuth = new HybridAuth($modx, $config); if (!empty($_REQUEST['hauth_action'])) { switch ($_REQUEST['hauth_action']) { case 'login': $HybridAuth->Login(@$_REQUEST['provider']); break; case 'logout': $HybridAuth->Logout(); break; } } else { $HybridAuth->processAuth(); } } break; case 'OnWebAuthentication': $modx->event->_output = !empty($_SESSION['HybridAuth']['verified']); unset($_SESSION['HybridAuth']['verified']); break; case 'OnUserFormPrerender':