本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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);
}
示例5: initialize
public function initialize(Controller $Controller)
{
$this->Controller = $Controller;
parent::initialize($Controller);
}
示例6: initialize
function initialize(&$controller)
{
ClassRegistry::addObject('LoadsysAuthComponent', $this);
parent::initialize($controller);
}
示例7: initialize
function initialize(&$controller) {
parent::initialize($controller);
//phpCAS::setDebug();
phpCAS::client(CAS_VERSION_2_0,'secure.yourdomain.com',443,'/cas/',false);
phpCAS::setNoCasServerValidation();
}
示例8: initialize
public function initialize($controller, $settings = array())
{
$this->controller = $controller;
return parent::initialize($controller, $settings);
}
示例9: initialize
function initialize(&$controller)
{
parent::initialize($controller);
phpCAS::setDebug(false);
}