Apply group weight system to API token modifications

This commit is contained in:
2026-05-19 22:30:38 +02:00
parent 995eca4111
commit fa5459df56
5 changed files with 75 additions and 54 deletions

View File

@@ -90,12 +90,14 @@ The Sentri gnomes';
$this->apiOutput(200, ['success' => 'User created successfully. mail has been sent']);
}
private function getUserGroupWeight()
public function getUserGroupWeight($user_group_uuid = false)
{
require_once 'API_usergroups.php';
$API_usergroups = new API_usergroups();
$_GET['builder'] = [1 => ['where' => [0 => 'user_group_uuid', 1 => $this->data['user_group_uuid']]]];
$uuid = $user_group_uuid ?: $this->data['user_group_uuid'];
$_GET['builder'] = [1 => ['where' => [0 => 'user_group_uuid', 1 => $uuid]]];
return $API_usergroups->getUserGroup()[0]['user_group_weight'];
}