From 3a796d1e1533febc63a2719816815b47f2065e82 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 9 Feb 2016 17:16:43 +0100 Subject: Consolidate getQuota and setQuota methods in User instance --- settings/ajax/setquota.php | 2 +- settings/controller/userscontroller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'settings') diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index dbdfb98bc8c..94fd7bd1e2b 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -56,7 +56,7 @@ if($quota !== 'none' and $quota !== 'default') { // Return Success story if($username) { - \OC::$server->getConfig()->setUserValue($username, 'files', 'quota', $quota); + $targetUserObject->setQuota($quota); }else{//set the default quota when no username is specified if($quota === 'default') {//'default' as default quota makes no sense $quota='none'; diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php index 17629fe924f..3e5455751ab 100644 --- a/settings/controller/userscontroller.php +++ b/settings/controller/userscontroller.php @@ -184,7 +184,7 @@ class UsersController extends Controller { 'displayname' => $user->getDisplayName(), 'groups' => (empty($userGroups)) ? $this->groupManager->getUserGroupIds($user) : $userGroups, 'subadmin' => $subAdminGroups, - 'quota' => $this->config->getUserValue($user->getUID(), 'files', 'quota', 'default'), + 'quota' => $user->getQuota(), 'storageLocation' => $user->getHome(), 'lastLogin' => $user->getLastLogin() * 1000, 'backend' => $user->getBackendClassName(), -- cgit v1.2.3