当前位置: 首页>>代码示例>>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;未经允许,请勿转载。