summaryrefslogtreecommitdiffstats
path: root/lib/private/ocs/cloud.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/ocs/cloud.php')
-rw-r--r--lib/private/ocs/cloud.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php
index 0d93819b9e4..2cf40c449ff 100644
--- a/lib/private/ocs/cloud.php
+++ b/lib/private/ocs/cloud.php
@@ -41,11 +41,11 @@ class OC_OCS_Cloud {
}
public static function getCurrentUser() {
- $email=\OC::$server->getConfig()->getUserValue(OC_User::getUser(), 'settings', 'email', '');
+ $userObject = \OC::$server->getUserManager()->get(OC_User::getUser());
$data = array(
- 'id' => OC_User::getUser(),
- 'display-name' => OC_User::getDisplayName(),
- 'email' => $email,
+ 'id' => $userObject->getUID(),
+ 'display-name' => $userObject->getDisplayName(),
+ 'email' => $userObject->getEMailAddress(),
);
return new OC_OCS_Result($data);
}