[Pkg-owncloud-commits] [owncloud] 219/394: backport of de34f771c22b9a54fa22d9c00741e362f47c852d

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:09 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit b0a81b5b0d727ba809bf723fc4d0504e5910a999
Author: Lorenzo M. Catucci <lorenzo at sancho.ccd.uniroma2.it>
Date:   Thu Dec 6 18:11:14 2012 +0100

    backport of de34f771c22b9a54fa22d9c00741e362f47c852d
---
 apps/user_ldap/lib/access.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 7702f16..f2370cb 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -283,8 +283,8 @@ abstract class Access {
 		}
 		$ldapname = $this->sanitizeUsername($ldapname);
 
-		//a new user/group! Then let's try to add it. We're shooting into the blue with the user/group name, assuming that in most cases there will not be a conflict. Otherwise an error will occur and we will continue with our second shot.
-		if(($isUser && !\OCP\User::userExists($ldapname)) || (!$isUser && !\OC_Group::groupExists($ldapname))) {
+		//a new user/group! Add it only if it doesn't conflict with other backend's users or existing groups
+		if(($isUser && !\OCP\User::userExists($ldapname, 'OCA\\user_ldap\\USER_LDAP')) || (!$isUser && !\OC_Group::groupExists($ldapname))) {
 			if($this->mapComponent($dn, $ldapname, $isUser)) {
 				return $ldapname;
 			}
@@ -755,4 +755,4 @@ abstract class Access {
 	private function DNasBaseParameter($dn) {
 		return str_replace('\\5c', '\\', $dn);
 	}
-}
\ No newline at end of file
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list