The account overview is now grouped by the account type
This commit is contained in:
parent
2e5046f8c3
commit
dc8b87e008
1 changed files with 11 additions and 12 deletions
|
@ -48,24 +48,23 @@ class Summary extends BaseModeration
|
|||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content();
|
||||
|
||||
|
||||
$accounts = [
|
||||
[$this->t('Normal Account'), 0],
|
||||
[$this->t('Automatic Follower Account'), 0],
|
||||
[$this->t('Public Group Account'), 0],
|
||||
[$this->t('Automatic Friend Account'), 0],
|
||||
[$this->t('Blog Account'), 0],
|
||||
[$this->t('Private Group Account'), 0]
|
||||
[$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;
|
||||
|
||||
$pageFlagsCountStmt = $this->database->p('SELECT `page-flags`, COUNT(`uid`) AS `count` FROM `user` WHERE `uid` != ? GROUP BY `page-flags`', 0);
|
||||
while ($pageFlagsCount = $this->database->fetch($pageFlagsCountStmt)) {
|
||||
$accounts[$pageFlagsCount['page-flags']][1] = $pageFlagsCount['count'];
|
||||
$users += $pageFlagsCount['count'];
|
||||
$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($pageFlagsCountStmt);
|
||||
$this->database->close($accountTypeCountStmt);
|
||||
|
||||
$this->logger->debug('accounts', ['accounts' => $accounts]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue