misuzu/public/manage/users/index.php

24 lines
529 B
PHP
Raw Normal View History

2022-09-13 13:14:49 +00:00
<?php
namespace Misuzu;
use Misuzu\Users\User;
require_once '../../../misuzu.php';
if(!User::hasCurrent() || !perms_check_user(MSZ_PERMS_USER, User::getCurrent()->getId(), MSZ_PERM_USER_MANAGE_USERS)) {
echo render_error(403);
return;
}
$pagination = new Pagination(User::countAll(true), 30);
if(!$pagination->hasValidOffset()) {
echo render_error(404);
return;
}
Template::render('manage.users.users', [
'manage_users' => User::all(true, $pagination),
'manage_users_pagination' => $pagination,
]);