Changeset 12520
- Timestamp:
- Aug 3, 2009, 3:46:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/lib/user/sfOpenPNESecurityUser.class.php
r12341 r12520 42 42 } 43 43 44 public function getAuth Modes()45 { 46 $ is_mobile = sfConfig::get('app_is_mobile', false);44 public function getAuthAdapters() 45 { 46 $adapters = array(); 47 47 $plugins = sfContext::getInstance()->getConfiguration()->getEnabledAuthPlugin(); 48 49 $result = array();50 48 51 49 foreach ($plugins as $pluginName) … … 53 51 $endPoint = strlen($pluginName) - strlen('opAuth') - strlen('Plugin'); 54 52 $authMode = substr($pluginName, strlen('opAuth'), $endPoint); 55 56 53 $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 { 58 68 if (($is_mobile && !$adapter->getAuthConfig('enable_mobile')) 59 69 || (!$is_mobile && !$adapter->getAuthConfig('enable_pc')))
Note: See TracChangeset
for help on using the changeset viewer.