You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Models/Group.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ public function syncModulePermissions($id_module, $permessi)
99
99
100
100
foreach ($default_viewsas$view) {
101
101
// Controlla se il gruppo ha già accesso a questa vista specifica
102
-
$has_view_access = $database->fetchNum('SELECT COUNT(*) as cont FROM `zz_group_view` WHERE `id_gruppo` = '.prepare($this->id).' AND `id_vista` = '.prepare($view['id']))['cont'];
102
+
$has_view_access = $database->fetchArray('SELECT COUNT(*) as cont FROM `zz_group_view` WHERE `id_gruppo` = '.prepare($this->id).' AND `id_vista` = '.prepare($view['id']))['cont'];
103
103
104
104
if ($has_view_access == 0) {
105
105
$database->insert('zz_group_view', [
@@ -114,7 +114,7 @@ public function syncModulePermissions($id_module, $permessi)
114
114
115
115
foreach ($default_segmentsas$segment) {
116
116
// Controlla se il gruppo ha già accesso a questo segmento specifico
117
-
$has_segment_access = $database->fetchNum('SELECT COUNT(*) as cont FROM `zz_group_segment` WHERE `id_gruppo` = '.prepare($this->id).' AND `id_segment` = '.prepare($segment['id']))['cont'];
117
+
$has_segment_access = $database->fetchArray('SELECT COUNT(*) as cont FROM `zz_group_segment` WHERE `id_gruppo` = '.prepare($this->id).' AND `id_segment` = '.prepare($segment['id']))['cont'];
0 commit comments