[Pkg-owncloud-commits] [owncloud] 03/69: if a user that is flag as deleted shows up again, remove that flag. Fixes #20090

David Prévot taffit at moszumanska.debian.org
Wed Nov 11 02:03:57 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit eef80b0d309ce18e2090868e2caba603e06ede43
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Fri Oct 30 19:20:42 2015 +0100

    if a user that is flag as deleted shows up again, remove that flag. Fixes #20090
---
 apps/user_ldap/lib/access.php           | 5 +++++
 apps/user_ldap/lib/user/offlineuser.php | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 32472c1..72b381a 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -35,6 +35,7 @@
 
 namespace OCA\user_ldap\lib;
 
+use OCA\user_ldap\lib\user\OfflineUser;
 use OCA\User_LDAP\Mapping\AbstractMapping;
 
 /**
@@ -695,6 +696,10 @@ class Access extends LDAPUtility implements user\IUserTools {
 			$ocName  = $this->dn2ocname($userRecord['dn'][0], $userRecord[$this->connection->ldapUserDisplayName]);
 			$this->cacheUserExists($ocName);
 			$user = $this->userManager->get($ocName);
+			if($user instanceof OfflineUser) {
+				$user->unmark();
+				$user = $this->userManager->get($ocName);
+			}
 			$user->processAttributes($userRecord);
 		}
 	}
diff --git a/apps/user_ldap/lib/user/offlineuser.php b/apps/user_ldap/lib/user/offlineuser.php
index 0727eb5..336370a 100644
--- a/apps/user_ldap/lib/user/offlineuser.php
+++ b/apps/user_ldap/lib/user/offlineuser.php
@@ -85,6 +85,13 @@ class OfflineUser {
 	}
 
 	/**
+	 * remove the Delete-flag from the user.
+	 */
+	public function unmark() {
+		$this->config->setUserValue($this->ocName, 'user_ldap', 'isDeleted', '0');
+	}
+
+	/**
 	 * exports the user details in an assoc array
 	 * @return array
 	 */

-- 
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