From 7cab0bd19c6496393f5d98546ce8890e09c57d94 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 13 Jun 2013 22:14:12 +0200 Subject: [PATCH] Fix: $database inaccessible from within User::GetVpsCount --- frontend/classes/user.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/classes/user.php b/frontend/classes/user.php index 01569f4..8145729 100644 --- a/frontend/classes/user.php +++ b/frontend/classes/user.php @@ -52,6 +52,8 @@ class User extends CPHPDatabaseRecordClass public function GetVpsCount() { + global $database; + if($result = $database->CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $this->sId))) { return count($result->data);