You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/classes/user.class.php
+44-49Lines changed: 44 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ public function getTopInviters($limit=10,$start=0) {
163
163
$invitation->setDebug($this->debug);
164
164
$invitation->setLog($this->log);
165
165
$stmt = $this->mysqli->prepare("
166
-
SELECT COUNT(i.account_id) AS invitationcount,a.id,a.username,a.email,
166
+
SELECT COUNT(i.account_id) AS invitationcount,a.id,a.username,a.email,
167
167
(SELECT COUNT(account_id) FROM " . $invitation->getTableName() . " WHERE account_id = i.account_id AND is_activated = 1 GROUP BY account_id) AS activated
168
168
FROM " . $invitation->getTableName() . " AS i
169
169
LEFT JOIN " . $this->getTableName() . " AS a
@@ -340,38 +340,20 @@ public function getAllAutoPayout() {
340
340
$this->debug->append("STA " . __METHOD__, 4);
341
341
$stmt = $this->mysqli->prepare("
342
342
SELECT
343
-
id, username, coin_address, ap_threshold
344
-
FROM " . $this->getTableName() . "
345
-
WHERE ap_threshold > 0
346
-
AND coin_address IS NOT NULL
343
+
a.id, a.username, ca.coin_address AS coin_address, a.ap_threshold
344
+
FROM " . $this->getTableName() . " AS a
345
+
LEFT JOIN " . $this->coin_address->getTableName() . " AS ca
346
+
ON a.id = ca.account_id
347
+
WHERE ap_threshold > 0 AND ca.currency = ?
348
+
AND ca.coin_address IS NOT NULL
347
349
");
348
-
if ( $this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) {
Copy file name to clipboardExpand all lines: include/pages/account/workers.inc.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,10 @@
4
4
if ($user->isAuthenticated()) {
5
5
6
6
7
-
if (!$user->getCoinAddress($_SESSION['USERDATA']['id']) AND$setting->getValue('disable_worker_edit')) {
8
-
7
+
if (!$coin_address->getCoinAddress($_SESSION['USERDATA']['id']) AND$setting->getValue('disable_worker_edit')) {
9
8
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'alert alert-danger');
10
9
$_SESSION['POPUP'][] = array('CONTENT' => 'You can not add workers unless a valid Payout Address is set in your User Settings.', 'TYPE' => 'alert alert-danger');
0 commit comments