Skip to content

Commit

Permalink
LdapUserGroupBackend: Remove the remaining code duplicates
Browse files Browse the repository at this point in the history
refs #9950
refs #9772
  • Loading branch information
Johannes Meyer committed Sep 25, 2015
1 parent 23631c8 commit b19ecbf
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,63 +103,6 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
)
);

/**
* Normed attribute names based on known LDAP environments
*
* @var array
*/
protected $normedAttributes = array(
'uid' => 'uid',
'gid' => 'gid',
'user' => 'user',
'group' => 'group',
'member' => 'member',
'inetorgperson' => 'inetOrgPerson',
'samaccountname' => 'sAMAccountName'
);

/**
* Return the given attribute name normed to known LDAP enviroments, if possible
*
* @param string $name
*
* @return string
*/
protected function getNormedAttribute($name)
{
$loweredName = strtolower($name);
if (array_key_exists($loweredName, $this->normedAttributes)) {
return $this->normedAttributes[$loweredName];
}

return $name;
}

/**
* Set this repository's name
*
* @param string $name
*
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}

/**
* Return this repository's name
*
* In case no name has been explicitly set yet, the class name is returned.
*
* @return string
*/
public function getName()
{
return $this->name;
}

/**
* Set the base DN to use for a user query
*
Expand Down

0 comments on commit b19ecbf

Please sign in to comment.