if ($prefixPath == 'principals') {
foreach(OC_User::getUsers() as $user) {
+
$user_uri = 'principals/'.$user;
$principals[] = array(
'uri' => $user_uri,
'{DAV:}displayname' => $user,
);
+
+ $email= \OCP\Config::getUserValue($user, 'settings', 'email');
+ if($email) {
+ $principals['{http://sabredav.org/ns}email-address'] = $email;
+ }
}
}
list($prefix, $name) = explode('/', $path);
if ($prefix == 'principals' && OC_User::userExists($name)) {
+
return array(
'uri' => 'principals/'.$name,
'{DAV:}displayname' => $name,
);
+
+ $email= \OCP\Config::getUserValue($user, 'settings', 'email');
+ if($email) {
+ $principals['{http://sabredav.org/ns}email-address'] = $email;
+ }
}
return null;