From 1390c12a5dfa1fc7eac8219d3b77b9e67ea3ee88 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 14 May 2013 23:57:52 +0200 Subject: [PATCH] updated user class, removed hashrate and added getTableName --- public/include/classes/user.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index 24e4484c..fe358314 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -162,15 +162,16 @@ class User { return true; } + public function getTableName() { + return $this->table; + } + public function getUserData($userID) { $this->debug->append("Fetching user information for user id: $userID"); $stmt = $this->mysqli->prepare(" SELECT id, username, pin, pass, admin, IFNULL(donate_percent, '0') as donate_percent, coin_address, ap_threshold, - ( - SELECT ROUND(COUNT(id) * POW(2,21)/600/1000) FROM shares WHERE $this->table.username = SUBSTRING_INDEX( `username` , '.', 1 ) AND time > DATE_SUB(now(), INTERVAL 10 MINUTE) - ) AS hashrate, ( SELECT COUNT(id) FROM shares