|
@@ 312-321 (lines=10) @@
|
| 309 |
|
* @param string $ldapName optional, the display name of the object |
| 310 |
|
* @return string|false with the name to use in ownCloud, false on DN outside of search DN |
| 311 |
|
*/ |
| 312 |
|
public function dn2groupname($fdn, $ldapName = null) { |
| 313 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 314 |
|
//with the group support, check whether the provided DN matches one of |
| 315 |
|
//the given Bases |
| 316 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseGroups)) { |
| 317 |
|
return false; |
| 318 |
|
} |
| 319 |
|
|
| 320 |
|
return $this->dn2ocname($fdn, $ldapName, false); |
| 321 |
|
} |
| 322 |
|
|
| 323 |
|
/** |
| 324 |
|
* accepts an array of group DNs and tests whether they match the user |
|
@@ 368-377 (lines=10) @@
|
| 365 |
|
* @param string $ldapName optional, the display name of the object |
| 366 |
|
* @return string|false with with the name to use in ownCloud |
| 367 |
|
*/ |
| 368 |
|
public function dn2username($fdn, $ldapName = null) { |
| 369 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 370 |
|
//with the group support, check whether the provided DN matches one of |
| 371 |
|
//the given Bases |
| 372 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseUsers)) { |
| 373 |
|
return false; |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
return $this->dn2ocname($fdn, $ldapName, true); |
| 377 |
|
} |
| 378 |
|
|
| 379 |
|
/** |
| 380 |
|
* returns an internal ownCloud name for the given LDAP DN, false on DN outside of search DN |