當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。