Skip to content

Commit

Permalink
Tracking: fix duplicated users report that only showed the first resu…
Browse files Browse the repository at this point in the history
…lt - refs BT#20575
  • Loading branch information
NicoDucou committed May 24, 2023
1 parent 26b36a9 commit 8be357f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main/inc/lib/statistics.lib.php
Expand Up @@ -1917,19 +1917,19 @@ private static function getDuplicatedUsers(array $additionalExtraFieldsInfo): ar
$usersInfo = [];

while ($rowStat = Database::fetch_assoc($result)) {
$sql = "SELECT id, email, registration_date, status, active
$subsql = "SELECT id, email, registration_date, status, active
FROM user WHERE firstname = '{$rowStat['firstname']}' AND lastname = '{$rowStat['lastname']}'"
;

$result = Database::query($sql);
$subResult = Database::query($subsql);

if (1 > Database::num_rows($result)) {
if (1 > Database::num_rows($subResult)) {
continue;
}

$objExtraValue = new ExtraFieldValue('user');

while ($rowUser = Database::fetch_assoc($result)) {
while ($rowUser = Database::fetch_assoc($subResult)) {
$studentId = $rowUser['id'];

$studentInfo = [];
Expand Down

0 comments on commit 8be357f

Please sign in to comment.