本文整理汇总了PHP中handleNormalFlowExceptions函数的典型用法代码示例。如果您正苦于以下问题:PHP handleNormalFlowExceptions函数的具体用法?PHP handleNormalFlowExceptions怎么用?PHP handleNormalFlowExceptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了handleNormalFlowExceptions函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
public function authenticate()
{
try {
$as = new \SimpleSAML_Auth_Simple($this->_domain);
$globalConfig = \SimpleSAML_Configuration::getInstance();
//$globalConfig::setConfigDir(G_CONFIGDIR.'saml/');
$as->requireAuth();
if ($as->isAuthenticated()) {
$attributes = $as->getAttributes();
if (!array_key_exists($this->_sso_settings['saml_email'], $attributes)) {
// TemplateController::setMessage(("A valid email is needed for account related communication").". ".("Check that the %s attribute (%s) defined in your configuration is correct",("Email"),$this->_sso_settings['saml_email']), 'error');
$this->ssoLogout();
} elseif (!array_key_exists($this->_sso_settings['saml_first_name'], $attributes)) {
// TemplateController::setMessage(("'%s' is required",("First name")).". ".("Check that the %s attribute (%s) defined in your configuration is correct",("First name"),$this->_sso_settings['saml_first_name']), 'error');
$this->ssoLogout();
} elseif (!array_key_exists($this->_sso_settings['saml_last_name'], $attributes)) {
// TemplateController::setMessage(("'%s' is required",("Last name")).". ".("Check that the %s attribute (%s) defined in your configuration is correct",("Last name"),$this->_sso_settings['saml_last_name']), 'error');
$this->ssoLogout();
} else {
if (trim($attributes[$this->_sso_settings['saml_email']][0]) == '') {
$attributes[$this->_sso_settings['saml_email']][0] = " ";
// TemplateController::setMessage(("A valid email is needed for account related communication"), 'error');
}
if (trim($attributes[$this->_sso_settings['saml_first_name']][0]) == '' && trim($attributes[$this->_sso_settings['saml_last_name']][0]) == '') {
$attributes[$this->_sso_settings['saml_first_name']][0] = ' ';
$attributes[$this->_sso_settings['saml_last_name']][0] = ' ';
} else {
if (trim($attributes[$this->_sso_settings['saml_first_name']][0]) == '') {
$attributes[$this->_sso_settings['saml_first_name']][0] = $attributes[$this->_sso_settings['saml_last_name']][0];
}
if (trim($attributes[$this->_sso_settings['saml_last_name']][0]) == '') {
$attributes[$this->_sso_settings['saml_last_name']][0] = $attributes[$this->_sso_settings['saml_first_name']][0];
}
}
$this->_login($attributes);
//pr($attributes);exit;
//echo "redirect now";exit;
//\SimpleSAML_Utilities::postRedirect("https://index.php", $attributes);
}
}
} catch (\SimpleSAML_Error_Error $e) {
$this->_samlErrorHandler($e);
} catch (\Exception $e) {
handleNormalFlowExceptions($e);
}
return $this;
}
示例2: array
#cpp#endif
if ((!isset($currentUser->coreAccess['personal_messages']) || $currentUser->coreAccess['personal_messages'] != 'hidden') && EfrontUser::isOptionVisible('messages')) {
$myCoursesOptions[] = array('text' => _MESSAGES, 'image' => "32x32/mail.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=messages");
}
if (EfrontUser::isOptionVisible('statistics')) {
$myCoursesOptions[] = array('text' => _STATISTICS, 'image' => "32x32/reports.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=statistics");
}
if (EfrontUser::isOptionVisible('forum')) {
$myCoursesOptions[] = array('text' => _FORUM, 'image' => "32x32/forum.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=forum");
}
if (EfrontUser::isOptionVisible('calendar')) {
$myCoursesOptions[] = array('text' => _CALENDAR, 'image' => "32x32/calendar.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=calendar");
}
if (EfrontUser::isOptionVisible('professor_courses') && ($_SESSION['s_type'] == 'professor' || $currentUser->user['user_type'] == 'professor')) {
if ($currentUser->coreAccess['professor_courses'] != 'hidden') {
$myCoursesOptions[] = array('text' => _COURSES, 'image' => "32x32/courses.png", 'href' => "professor.php?ctg=courses");
$myCoursesOptions[] = array('text' => _LESSONS, 'image' => "32x32/lessons.png", 'href' => "professor.php?ctg=professor_lessons");
}
}
foreach ($loadedModules as $module) {
if ($linkInfo = $module->getToolsLinkInfo()) {
$myCoursesOptions[] = array('text' => $linkInfo['title'], 'image' => eF_getRelativeModuleImagePath($linkInfo['image']), 'href' => $linkInfo['link']);
}
}
$smarty->assign("T_LAYOUT_CLASS", $currentTheme->options['toolbar_position'] == "left" ? "hideRight" : "hideLeft");
//Whether to show the sidemenu on the left or on the right
$smarty->assign("T_COURSES_LIST_OPTIONS", $myCoursesOptions);
}
} catch (Exception $e) {
handleNormalFlowExceptions($e);
}
示例3: handleInstallationExceptions
public static function handleInstallationExceptions($e)
{
if ($_GET['unattended']) {
handleAjaxExceptions($e);
} else {
handleNormalFlowExceptions($e);
}
}