From 66a2f3b0b9b0e1218f38a501095b9e5a9a1b1e9b Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 21 Oct 2013 20:06:11 +0200 Subject: New OCS route: /ocs/cloud/user Response: ok 100 thomas DeepDiver no-response@domain.tld --- lib/private/ocs/cloud.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/private') diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php index 2dd99319057..cbbf3b626f5 100644 --- a/lib/private/ocs/cloud.php +++ b/lib/private/ocs/cloud.php @@ -64,8 +64,7 @@ class OC_OCS_Cloud { // Check if they are viewing information on themselves if($parameters['userid'] === OC_User::getUser()) { // Self lookup - $quota = array(); - $storage = OC_Helper::getStorageInfo(); + $storage = OC_Helper::getStorageInfo('/'); $quota = array( 'free' => $storage['free'], 'used' => $storage['used'], @@ -79,6 +78,16 @@ class OC_OCS_Cloud { } } + public static function getCurrentUser() { + $email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', ''); + $data = array( + 'id' => OC_User::getUser(), + 'display-name' => OC_User::getDisplayName(), + 'email' => $email, + ); + return new OC_OCS_Result($data); + } + public static function getUserPublickey($parameters) { if(OC_User::userExists($parameters['user'])) { -- cgit v1.2.3