|
@@ 341-350 (lines=10) @@
|
| 338 |
|
* @param string $ldapName optional, the display name of the object |
| 339 |
|
* @return string|false with the name to use in ownCloud, false on DN outside of search DN |
| 340 |
|
*/ |
| 341 |
|
public function dn2groupname($fdn, $ldapName = null) { |
| 342 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 343 |
|
//with the group support, check whether the provided DN matches one of |
| 344 |
|
//the given Bases |
| 345 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseGroups)) { |
| 346 |
|
return false; |
| 347 |
|
} |
| 348 |
|
|
| 349 |
|
return $this->dn2ocname($fdn, $ldapName, false); |
| 350 |
|
} |
| 351 |
|
|
| 352 |
|
/** |
| 353 |
|
* accepts an array of group DNs and tests whether they match the user |
|
@@ 397-406 (lines=10) @@
|
| 394 |
|
* @param string $ldapName optional, the display name of the object |
| 395 |
|
* @return string|false with with the name to use in ownCloud |
| 396 |
|
*/ |
| 397 |
|
public function dn2username($fdn, $ldapName = null) { |
| 398 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 399 |
|
//with the group support, check whether the provided DN matches one of |
| 400 |
|
//the given Bases |
| 401 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseUsers)) { |
| 402 |
|
return false; |
| 403 |
|
} |
| 404 |
|
|
| 405 |
|
return $this->dn2ocname($fdn, $ldapName, true); |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
/** |
| 409 |
|
* returns an internal ownCloud name for the given LDAP DN, false on DN outside of search DN |