1 | <?php |
||
15 | class StatsIdUsers extends StatisticsPage |
||
16 | { |
||
17 | protected function execute() |
||
18 | { |
||
19 | return $this->getUserList(); |
||
20 | } |
||
21 | |||
22 | public function getPageTitle() |
||
23 | { |
||
24 | return "User identification status"; |
||
25 | } |
||
26 | |||
27 | public function getPageName() |
||
30 | } |
||
31 | |||
32 | public function isProtected() |
||
33 | { |
||
34 | return true; |
||
35 | } |
||
36 | |||
37 | private function getUserList() |
||
38 | { |
||
39 | global $currentIdentificationVersion, $forceIdentification; |
||
40 | |||
41 | $query = <<<SQL |
||
42 | select username, status, checkuser, identified, case |
||
43 | when coalesce(identified, 0) = 0 then 'Not identified' |
||
44 | when identified < ${forceIdentification} then 'Expired' |
||
45 | when identified >= ${forceIdentification} and identified < ${currentIdentificationVersion} then 'About to expire' |
||
46 | when identified = ${currentIdentificationVersion} then 'OK' |
||
47 | else 'Unknown' |
||
48 | end |
||
49 | from user |
||
50 | where status in ('User', 'Admin', 'New') |
||
51 | order by username; |
||
52 | SQL; |
||
53 | |||
54 | $qb = new QueryBrowser(); |
||
55 | $qb->rowFetchMode = PDO::FETCH_NUM; |
||
56 | $qb->overrideTableTitles = array("User name", "Access level", "Checkuser?", "Version", "Identification status"); |
||
57 | $r = $qb->executeQueryToTable($query); |
||
58 | |||
59 | return $r; |
||
60 | } |
||
61 | |||
62 | public function requiresWikiDatabase() |
||
65 | } |
||
66 | } |
||
67 |