]> git.agnieray.net Git - galette.git/commitdiff
Fix default selected group; closes #1598
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 28 Nov 2021 11:47:31 +0000 (12:47 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 28 Nov 2021 12:54:27 +0000 (13:54 +0100)
galette/lib/Galette/Controllers/Crud/GroupsController.php

index 48a0ad0bb054704ab2a962dcafd1a32a8968b10b..224f56779a3d03d57127f984a80b746b7943b85f 100644 (file)
@@ -165,8 +165,8 @@ class GroupsController extends CrudController
             }
         }
 
-        if ($id === null && count($groups_root) > 0) {
-            $group = current($groups_root);
+        if ($id === null && count($groups_list) > 0) {
+            $group = current($groups_list);
             if (!$this->login->isGroupManager($id)) {
                 foreach ($groups_list as $g) {
                     if ($this->login->isGroupManager($g->getId())) {