]> source.dussan.org Git - nextcloud-server.git/commitdiff
forgotten $, incorrect subtract
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 20 Jun 2012 10:41:30 +0000 (12:41 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Wed, 20 Jun 2012 10:47:31 +0000 (12:47 +0200)
apps/user_ldap/lib_ldap.php

index 6feb6d3c6598ec8824afe01f80d852d07bde94f0..aa104eb51265f7281a75dd11c36a441ca76c4721 100644 (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);