summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-10-31 19:53:47 +0100
committerVincent Petry <pvince81@owncloud.com>2014-10-31 19:53:47 +0100
commit46d8c0a2d69f2c0c6a94f58a96ddc3835a3754c8 (patch)
tree657ed22a5e33c09da5b11d4af01f57745399da9c
parentfe9e6be35ca1759eead73bb7bd32dc8ead1f236e (diff)
parent56cf1d9d2754a0fcfc52dbde5b1bada27341f2b6 (diff)
downloadnextcloud-server-46d8c0a2d69f2c0c6a94f58a96ddc3835a3754c8.tar.gz
nextcloud-server-46d8c0a2d69f2c0c6a94f58a96ddc3835a3754c8.zip
Merge pull request #11894 from owncloud/fix-unreachable-code
fix odd behaviour
-rw-r--r--lib/private/connector/sabre/principal.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/connector/sabre/principal.php b/lib/private/connector/sabre/principal.php
index c674e2aa779..fe17fb991ca 100644
--- a/lib/private/connector/sabre/principal.php
+++ b/lib/private/connector/sabre/principal.php
@@ -28,15 +28,17 @@ class OC_Connector_Sabre_Principal implements \Sabre\DAVACL\PrincipalBackend\Bac
foreach(OC_User::getUsers() as $user) {
$user_uri = 'principals/'.$user;
- $principals[] = array(
+ $principal = array(
'uri' => $user_uri,
'{DAV:}displayname' => $user,
);
$email= \OCP\Config::getUserValue($user, 'settings', 'email');
if($email) {
- $principals['{http://sabredav.org/ns}email-address'] = $email;
+ $principal['{http://sabredav.org/ns}email-address'] = $email;
}
+
+ $principals[] = $principal;
}
}
@@ -56,15 +58,17 @@ class OC_Connector_Sabre_Principal implements \Sabre\DAVACL\PrincipalBackend\Bac
if ($prefix == 'principals' && OC_User::userExists($name)) {
- return array(
+ $principal = array(
'uri' => 'principals/'.$name,
'{DAV:}displayname' => $name,
);
$email= \OCP\Config::getUserValue($user, 'settings', 'email');
if($email) {
- $principals['{http://sabredav.org/ns}email-address'] = $email;
+ $principal['{http://sabredav.org/ns}email-address'] = $email;
}
+
+ return $principal;
}
return null;