forgotten $, incorrect subtract

This commit is contained in:
Arthur Schiwon 2012-06-20 12:41:30 +02:00
parent c4d1363419
commit 0289f442a8
1 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ class OC_LDAP {
* returns the internal ownCloud name for the given LDAP DN of the group
*/
static public function dn2groupname($dn, $ldapname = null) {
if(strrpos($dn, self::ldapBaseGroups) !== (strlen($dn)-strlen(self::ldapBaseGroups)-1)) {
if(strrpos($dn, self::$ldapBaseGroups) !== (strlen($dn)-strlen(self::$ldapBaseGroups))) {
return false;
}
return self::dn2ocname($dn, $ldapname, false);
@ -186,7 +186,7 @@ class OC_LDAP {
* returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN
*/
static public function dn2username($dn, $ldapname = null) {
if(strrpos($dn, self::ldapBaseUsers) !== (strlen($dn)-strlen(self::ldapBaseUsers)-1)) {
if(strrpos($dn, self::$ldapBaseUsers) !== (strlen($dn)-strlen(self::$ldapBaseUsers))) {
return false;
}
return self::dn2ocname($dn, $ldapname, true);