当前位置: 首页>>代码示例>>PHP>>正文


PHP handleNormalFlowExceptions函数代码示例

本文整理汇总了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;
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:47,代码来源:saml.class.php

示例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);
}
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:lessons_list.php

示例3: handleInstallationExceptions

 public static function handleInstallationExceptions($e)
 {
     if ($_GET['unattended']) {
         handleAjaxExceptions($e);
     } else {
         handleNormalFlowExceptions($e);
     }
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:8,代码来源:install.php


注:本文中的handleNormalFlowExceptions函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。