diff options
author | Marcin Łojewski <marcin.lojewski@mlojewski.me> | 2018-07-09 20:21:53 +0300 |
---|---|---|
committer | Marcin Łojewski <marcin.lojewski@mlojewski.me> | 2018-07-09 20:59:01 +0300 |
commit | ed37c7085d1750a863a67ba5e9faf74fe4f1eb0d (patch) | |
tree | c1a04e804e33572e83a3850e625bfae4bd1bf62d /lib/Query | |
parent | 49a9b2ed61eb002fdfbcdfb8efd200da8cb753a0 (diff) |
User quota from SQL
Diffstat (limited to 'lib/Query')
-rw-r--r-- | lib/Query/QueryProvider.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Query/QueryProvider.php b/lib/Query/QueryProvider.php index 49f2ac9..85a9f95 100644 --- a/lib/Query/QueryProvider.php +++ b/lib/Query/QueryProvider.php @@ -71,15 +71,18 @@ class QueryProvider implements \ArrayAccess $uHome = $this->properties[DB::USER_HOME_COLUMN]; $uName = $this->properties[DB::USER_NAME_COLUMN]; $uPassword = $this->properties[DB::USER_PASSWORD_COLUMN]; + $uQuota = $this->properties[DB::USER_QUOTA_COLUMN]; $uSalt = $this->properties[DB::USER_SALT_COLUMN]; $uUID = $this->properties[DB::USER_UID_COLUMN]; $ugGID = $this->properties[DB::USER_GROUP_GID_COLUMN]; $ugUID = $this->properties[DB::USER_GROUP_UID_COLUMN]; + $emailParam = Query::EMAIL_PARAM; $gidParam = Query::GID_PARAM; $nameParam = Query::NAME_PARAM; $passwordParam = Query::PASSWORD_PARAM; + $quotaParam = Query::QUOTA_PARAM; $searchParam = Query::SEARCH_PARAM; $uidParam = Query::UID_PARAM; @@ -91,6 +94,7 @@ class QueryProvider implements \ArrayAccess = "$uUID AS uid, " . (empty($uName) ? "null" : $uName) . " AS name, " . (empty($uEmail) ? "null" : $uEmail) . " AS email, " . + (empty($uQuota) ? "null" : $uQuota) . " AS quota, " . (empty($uHome) ? "null" : $uHome) . " AS home, " . (empty($uActive) ? "true" : $uActive) . " AS active, " . (empty($uAvatar) ? "false" : $uAvatar) . " AS avatar, " . @@ -156,7 +160,9 @@ class QueryProvider implements \ArrayAccess Query::SAVE_USER => "UPDATE $user " . "SET $uPassword = :$passwordParam, " . - "$uName = :$nameParam " . + "$uName = :$nameParam, " . + "$uEmail = :$emailParam, " . + "$uQuota = :$quotaParam " . "WHERE $uUID = :$uidParam", ]; } |