|
|
|
@ -50,8 +50,8 @@ class OC_User { |
|
|
|
|
* |
|
|
|
|
* Makes a list of backends that can be used by other modules |
|
|
|
|
*/ |
|
|
|
|
public static function registerBackend( $name ){ |
|
|
|
|
self::$_backends[] = $name; |
|
|
|
|
public static function registerBackend( $backend ){ |
|
|
|
|
self::$_backends[] = $backend; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -83,6 +83,9 @@ class OC_User { |
|
|
|
|
* Set the User Authentication Module |
|
|
|
|
*/ |
|
|
|
|
public static function useBackend( $backend = 'database' ){ |
|
|
|
|
if($backend instanceof OC_User_Backend){ |
|
|
|
|
self::$_usedBackends[get_class($backend)]=$backend; |
|
|
|
|
}else{ |
|
|
|
|
// You'll never know what happens |
|
|
|
|
if( null === $backend OR !is_string( $backend )){ |
|
|
|
|
$backend = 'database'; |
|
|
|
@ -100,6 +103,7 @@ class OC_User { |
|
|
|
|
self::$_usedBackends[$backend] = new $className(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
true; |
|
|
|
|
} |
|
|
|
|