Skip to content

Commit 12ec18e

Browse files
authored
Merge pull request #2 from Magehernan/fix/admincontroller
Admin Controller
2 parents 66e7f28 + 6ab68a8 commit 12ec18e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Controller/Admin/AdminController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,15 @@ public function account(Api $api, CmsSettingsRepository $settings, Request $requ
244244
}
245245
}
246246
}
247-
248-
$total = $api->getAllUsers($page)['total'];
249-
$total_page = ceil($total / 30);
247+
248+
$users = $api->getAllUsers($page);
249+
$total = $users['Total'];
250+
$total_page = floor($total / 30);
250251

251252

252253
return $this->render('admin/account/index.html.twig', [
253254
'total_page' => $total_page,
254-
'items' => $api->getAllUsers($page)['Values'],
255+
'items' => $users['Values'],
255256
'page_actuel' => $page
256257
]);
257258
}

0 commit comments

Comments
 (0)