1
0

Merge commit 'gallery3-contrib/master'

This commit is contained in:
rWatcher 2010-02-23 14:28:58 -05:00
commit 0c3264935f
2 changed files with 5 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class Gallery3 {
* @param string authentication token
* @return object Gallery3
*/
public function factory($url=null, $token=null) {
static function factory($url=null, $token=null) {
$obj = new Gallery3();
$obj->token = $token;
$obj->url = $url;

View File

@ -178,13 +178,16 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver {
public function groups() {
$groups = array();
foreach (self::$_params["groups"] as $group_name) {
$root = item::root();
$groups[] = $this->lookup_group_by_name($group_name);
}
return $groups;
}
static function groups_for($user) {
if ($user->guest) {
return $user->groups;
}
$result = ldap_search(self::$_connection, self::$_params["group_domain"],
"(memberUid=$user->name)");