當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Manager::getAuth方法代碼示例

本文整理匯總了PHP中Manager::getAuth方法的典型用法代碼示例。如果您正苦於以下問題:PHP Manager::getAuth方法的具體用法?PHP Manager::getAuth怎麽用?PHP Manager::getAuth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Manager的用法示例。


在下文中一共展示了Manager::getAuth方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: authenticate

 public function authenticate()
 {
     if ($this->data->datasource == '') {
         $this->data->datasource = 'fnapolo';
         //$this->renderPrompt('error', 'Inform database name.');
     }
     Manager::setConf('fnbr20.db', $this->data->datasource);
     Manager::getSession()->fnbr20db = $this->data->datasource;
     $auth = Manager::getAuth();
     $this->data->result = $auth->authenticate($this->data->user, $this->data->challenge, $this->data->response);
     if ($this->data->result) {
         $user = Manager::getLogin()->getUser();
         $this->data->idLanguage = $user->getConfigData('fnbr20IdLanguage');
         if ($this->data->idLanguage == '') {
             $this->data->idLanguage = 1;
             $user->setConfigData('fnbr20IdLanguage', $this->data->idLanguage);
         }
         if ($this->data->ifLanguage == '') {
             $this->data->ifLanguage = 'en';
             //$this->renderPrompt('error', 'Inform language.');
         }
         Manager::getSession()->idLanguage = $this->data->idLanguage;
         Manager::getSession()->lang = $this->data->ifLanguage;
         Manager::getSession()->fnbr20Level = $user->getUserLevel();
         $this->redirect(Manager::getURL('fnbr20/main'));
     } else {
         $this->renderPrompt('error', 'Login or password not valid.');
     }
 }
開發者ID:elymatos,項目名稱:expressive_fnbr,代碼行數:29,代碼來源:LoginController.php

示例2: authenticate

 public function authenticate()
 {
     $auth = Manager::getAuth();
     $this->data->result = $auth->authenticate($this->data->user, $this->data->challenge, $this->data->response);
     if ($this->data->result) {
         mdump("++++++++++++");
         $this->redirect(Manager::getURL('dlivro/main'));
     } else {
         $this->renderPrompt('error', 'Login ou senha inválidos. Tente novamente.');
     }
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:11,代碼來源:mainController.php

示例3: __construct

 public function __construct()
 {
     $this->auth = Manager::getAuth();
     $this->perms = array(A_ACCESS => "SELECT", A_INSERT => "INSERT", A_DELETE => "DELETE", A_UPDATE => "UPDATE", A_EXECUTE => "EXECUTE", A_ADMIN => "SYSTEM");
     $this->access = array('A_ACCESS' => A_ACCESS, 'A_QUERY' => A_ACCESS, 'A_INSERT' => A_INSERT, 'A_DELETE' => A_DELETE, 'A_UPDATE' => A_UPDATE, 'A_EXECUTE' => A_EXECUTE, 'A_SYSTEM' => A_ADMIN, 'A_ADMIN' => A_ADMIN);
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:6,代碼來源:mperms.php

示例4: invokeHandler

 public function invokeHandler($m, $handler)
 {
     global $context, $module, $action, $item, $session, $page, $auth, $perms, $navbar, $theme, $history, $self, $url;
     if ($handler == '') {
         return false;
     }
     //$this->data = $data;
     $this->action = $handler;
     $app = Manager::getApp();
     if ($m == '' || $m == $app) {
         $module = $app;
         $path = Manager::getAppPath() . '/controllers/';
     } else {
         $module = $m;
         $path = Manager::getModulePath($module, 'controllers/');
     }
     //mdump("Handler:invokeHandler: [$module][$handler]");
     $context = Manager::getContext();
     $action = $context->getAction();
     $self = $context->getAction();
     $item = mrequest('item');
     $session = Manager::getSession();
     $navbar = new MNavigationBar();
     //$view = Manager::getView($module, 'handler', $action);
     $page = $this->theme;
     $url = Manager::getCurrentURL();
     $auth = Manager::getAuth();
     $perms = Manager::getPerms();
     $theme = $this->theme;
     $file = $path . $handler . '.inc.php';
     //mdump('Handler:invokeHandler: file : ' . $file);
     if ($return = file_exists($file)) {
         include $file;
     }
     return $return;
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:36,代碼來源:mhandler.php


注:本文中的Manager::getAuth方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。