-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.4
Some issues in the way the resulsets are being proccessed in MFA report.
- function: factors_in_use_table(), factors_lock_table()
- file: admin/tool/mfa/classes/output/renderer.php
The query used is:
$alluserssql = "SELECT auth,
|
COUNT(id)
|
FROM {user}
|
WHERE deleted = 0 |
AND suspended = 0 |
GROUP BY auth";
|
$allusersinfo = $DB->get_records_sql($alluserssql, []);
|
The code to fill the table is:
$row[] = $allusersinfo[$authtype]->count ?? '-'; |
But "count" is always null. Maybe the query above should add "as count" to name the count field of the resultset. Something like this:
$alluserssql = "SELECT auth,
|
COUNT(id) as count
|
FROM {user}
|
WHERE deleted = 0 |
AND suspended = 0 |
GROUP BY auth";
|
$allusersinfo = $DB->get_records_sql($alluserssql, []);
|
There are some other similar occurrences in this file.