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


PHP AuthComponent::initialize方法代码示例

本文整理汇总了PHP中AuthComponent::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthComponent::initialize方法的具体用法?PHP AuthComponent::initialize怎么用?PHP AuthComponent::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AuthComponent的用法示例。


在下文中一共展示了AuthComponent::initialize方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 /**
  * Initialize callback for initialize
  * 
  * @access public
  */
 function initialize(&$Controller, $settings = array())
 {
     $settings += array('userModel' => 'JjUsers.UserUser', 'sessionKey' => 'JjAuth.UserUser', 'loginError' => __d('backstage', 'Login failed. Invalid username or password.', true), 'authError' => __d('backstage', 'You are not authorized to access that location.', true), 'loginAction' => array('plugin' => 'jj_users', 'controller' => 'user_users', 'action' => 'login'), 'loginRedirect' => array('plugin' => 'dashboard', 'controller' => 'dash_dashboard', 'action' => 'index'));
     parent::initialize($Controller, $settings);
     $this->Controller = $Controller;
     $this->compilePermissions();
 }
开发者ID:rcaravita,项目名称:jodeljodel,代码行数:12,代码来源:jj_auth.php

示例2: initialize

 public function initialize(Controller $controller)
 {
     parent::initialize($controller);
     $currentTenant = Configure::read('Config.current_tenant');
     $this->loginRedirect['current_tenant'] = $currentTenant;
     $this->loginAction['current_tenant'] = $currentTenant;
     $this->logoutRedirect['current_tenant'] = $currentTenant;
 }
开发者ID:waldemarnt,项目名称:cake-multi-tenant,代码行数:8,代码来源:MultiTenantAuthComponent.php

示例3: initialize

 public function initialize($Controller, $settings = array())
 {
     $params = array($Controller, $settings);
     $settings = $this->dispatchMethod('_setup', $params);
     $result = $this->Authenticators->triggerCallback('before', 'initialize', $params);
     if (!$this->Authenticators->interrupted) {
         // workaround warning error with 'expected argument 1 as a reference'
         $result = parent::initialize($Controller, $settings);
     }
     $result = $this->Authenticators->triggerCallback('after', 'initialize', array($result), 'enchain');
     return $result;
 }
开发者ID:hiromi2424,项目名称:modular_auth,代码行数:12,代码来源:base_modular_auth.php

示例4: initialize

 function initialize(Controller $controller)
 {
     $controller->Auth = $this;
     $this->loginAction = array('plugin' => 'flex_auth', 'controller' => 'flex_auth', 'action' => 'login');
     $userAuthMethod = Configure::read('user_config.authentication.method');
     if (!empty($userAuthMethod)) {
         $this->authenticate = array($this->pluginName . '.' . ucfirst($userAuthMethod));
         $logoutRedirect = Configure::read("user_config.{$userAuthMethod}.logout_url");
         if (!empty($logoutRedirect)) {
             $this->logoutRedirect = str_replace(array('%HOST%'), array($_SERVER['SERVER_NAME']), $logoutRedirect) . '?return=' . Router::url(array('plugin' => 'flex_auth', 'controller' => 'flex_auth', 'action' => 'login'), true);
         }
     }
     parent::initialize($controller);
 }
开发者ID:asadaqain,项目名称:Guide-on-the-Side,代码行数:14,代码来源:FlexAuthComponent.php

示例5: initialize

 public function initialize(Controller $Controller)
 {
     $this->Controller = $Controller;
     parent::initialize($Controller);
 }
开发者ID:miznokruge,项目名称:base-cake,代码行数:5,代码来源:AuthExtComponent.php

示例6: initialize

 function initialize(&$controller)
 {
     ClassRegistry::addObject('LoadsysAuthComponent', $this);
     parent::initialize($controller);
 }
开发者ID:princespn,项目名称:graybsoftware,代码行数:5,代码来源:loadsys_auth.php

示例7: initialize

 function initialize(&$controller) {
  parent::initialize($controller);
     //phpCAS::setDebug();                    
     phpCAS::client(CAS_VERSION_2_0,'secure.yourdomain.com',443,'/cas/',false);           
     phpCAS::setNoCasServerValidation();
 }
开发者ID:rajankz,项目名称:webspace,代码行数:6,代码来源:cas.php

示例8: initialize

 public function initialize($controller, $settings = array())
 {
     $this->controller = $controller;
     return parent::initialize($controller, $settings);
 }
开发者ID:hiromi2424,项目名称:ninja,代码行数:5,代码来源:ninja_auth.php

示例9: initialize

 function initialize(&$controller)
 {
     parent::initialize($controller);
     phpCAS::setDebug(false);
 }
开发者ID:rajankz,项目名称:webspace,代码行数:5,代码来源:CasAuthComponent.php


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