database = $database; } protected function content(array $request = []): string { parent::content(); $accounts = [ [$this->t('Personal Page'), 0], [$this->t('Organisation Page'), 0], [$this->t('News Page'), 0], [$this->t('Community Group'), 0], [$this->t('Channel Relay'), 0], ]; $users = 0; $accountTypeCountStmt = $this->database->p('SELECT `account-type`, COUNT(`uid`) AS `count` FROM `user` WHERE `uid` != ? GROUP BY `account-type`', 0); while ($AccountTypeCount = $this->database->fetch($accountTypeCountStmt)) { $accounts[$AccountTypeCount['account-type']][1] = $AccountTypeCount['count']; $users += $AccountTypeCount['count']; } $this->database->close($accountTypeCountStmt); $this->logger->debug('accounts', ['accounts' => $accounts]); $pending = Register::getPendingCount(); $t = Renderer::getMarkupTemplate('moderation/summary.tpl'); return Renderer::replaceMacros($t, [ '$title' => $this->t('Moderation'), '$page' => $this->t('Summary'), '$users' => [$this->t('Registered users'), $users], '$accounts' => $accounts, '$pending' => [$this->t('Pending registrations'), $pending], '$warningtext' => [], ]); } }