diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index 6bc12612..58ebc4b2 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -122,7 +122,13 @@ class User extends Base { **/ public function getLastRegisteredUsers($limit=10) { $this->debug->append("STA " . __METHOD__, 4); - $stmt = $this->mysqli->prepare("SELECT * FROM " . $this->getTableName() . " ORDER BY id DESC LIMIT ?"); + $stmt = $this->mysqli->prepare(" + SELECT a.id,a.username as mposuser,a.email,a.signup_timestamp,u.username as inviter FROM " . $this->getTableName() . " AS a + LEFT JOIN invitations AS i + ON a.email = i.email + LEFT JOIN " . $this->getTableName() . " as u + ON i.account_id = u.id + ORDER BY a.id DESC LIMIT ?"); if ($this->checkStmt($stmt) && $stmt->bind_param("i", $limit) && $stmt->execute() && $result = $stmt->get_result()) { return $result->fetch_all(MYSQLI_ASSOC); } diff --git a/public/templates/mpos/admin/dashboard/registrations.tpl b/public/templates/mpos/admin/dashboard/registrations.tpl index 500953d2..5aa16f59 100644 --- a/public/templates/mpos/admin/dashboard/registrations.tpl +++ b/public/templates/mpos/admin/dashboard/registrations.tpl @@ -1,51 +1,56 @@

Registrations

-
-

by time

- - - - - - - - - - - - - - - - - - - -
24 hours7 days1 month6 months1 year
{$USER_REGISTRATIONS.24hours}{$USER_REGISTRATIONS.7days}{$USER_REGISTRATIONS.1month}{$USER_REGISTRATIONS.6month}{$USER_REGISTRATIONS.1year}
-
+
+

by time

+ + + + + + + + + + + + + + + + + + + +
24 hours7 days1 month6 months1 year
{$USER_REGISTRATIONS.24hours}{$USER_REGISTRATIONS.7days}{$USER_REGISTRATIONS.1month}{$USER_REGISTRATIONS.6month}{$USER_REGISTRATIONS.1year}
+
-
-

Last 10 registered Users

-
- - - - - - - - - - +
+

Last 10 registered Users

+
+
IDUsernameeMailReg. Date
+ + + + + + + + + + + {section user $LASTREGISTEREDUSERS} - - - - - - + + + + + + + + {/section} - -
IDUsernameeMailReg. DateInviteInvited from
{$LASTREGISTEREDUSERS[user].id|escape}{$LASTREGISTEREDUSERS[user].username|escape}{$LASTREGISTEREDUSERS[user].email}{$LASTREGISTEREDUSERS[user].signup_timestamp|date_format:"%d/%m %H:%M:%S"}
{$LASTREGISTEREDUSERS[user].id|escape}{$LASTREGISTEREDUSERS[user].mposuser}{$LASTREGISTEREDUSERS[user].email}{$LASTREGISTEREDUSERS[user].signup_timestamp|date_format:"%d/%m %H:%M:%S"}{if !$LASTREGISTEREDUSERS[user].inviter}NO{else}YES{/if}{$LASTREGISTEREDUSERS[user].inviter}
-
+ + +
+ \ No newline at end of file