Skip to content

Commit

Permalink
Fixed issue #14793: Faulty assignments of query groups when importing…
Browse files Browse the repository at this point in the history
… participants from LDAP
  • Loading branch information
c-schmitz committed Apr 24, 2019
1 parent 9e678fb commit a5f19d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/views/admin/token/ldapform.php
Expand Up @@ -43,9 +43,12 @@
</label>
<div class="">
<select name='ldapQueries' class="form-control">
<?php $names = array_column($ldap_queries, 'name');
array_multisort($names, $ldap_queries);
foreach ($ldap_queries as $q_number => $q): ?>
<?php
uasort ( $ldap_queries , function ($a, $b) {
return strnatcmp($a['name'],$b['name']); // or other function/code
}
);
foreach ($ldap_queries as $q_number => $q): ?>
<option value="<?php echo $q_number; ?>"><?php echo $q['name']; ?></option>
<?php endforeach; ?>
</select>
Expand Down

1 comment on commit a5f19d4

@jolly-jump
Copy link

@jolly-jump jolly-jump commented on a5f19d4 Apr 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And it works, too ! 👍

Please sign in to comment.