ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12520


Ignore:
Timestamp:
Aug 3, 2009, 3:46:28 PM (14 years ago)
Author:
ebihara
Message:

#4219:splitted the sfOpenPNESecurityUser::getAuthModes() method in to 2 methods by the getAuthAdapters() method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/user/sfOpenPNESecurityUser.class.php

    r12341 r12520  
    4242  }
    4343
    44   public function getAuthModes()
    45   {
    46     $is_mobile = sfConfig::get('app_is_mobile', false);
     44  public function getAuthAdapters()
     45  {
     46    $adapters = array();
    4747    $plugins = sfContext::getInstance()->getConfiguration()->getEnabledAuthPlugin();
    48 
    49     $result = array();
    5048
    5149    foreach ($plugins as $pluginName)
     
    5351      $endPoint = strlen($pluginName) - strlen('opAuth') - strlen('Plugin');
    5452      $authMode = substr($pluginName, strlen('opAuth'), $endPoint);
    55 
    5653      $adapterClass = self::getAuthAdapterClassName($authMode);
    57       $adapter = new $adapterClass($authMode);
     54      $adapters[$authMode] = new $adapterClass($authMode);
     55    }
     56
     57    return $adapters;
     58  }
     59
     60  public function getAuthModes()
     61  {
     62    $is_mobile = sfConfig::get('app_is_mobile', false);
     63    $result = array();
     64
     65    $adapters = $this->getAuthAdapters();
     66    foreach ($adapters as $authMode => $adapter)
     67    {
    5868      if (($is_mobile && !$adapter->getAuthConfig('enable_mobile'))
    5969        || (!$is_mobile && !$adapter->getAuthConfig('enable_pc')))
Note: See TracChangeset for help on using the changeset viewer.