Problem with creating a user-group, it does not create the permissions for the new user group and generates a 500 error.
This commit is contained in:
@@ -688,6 +688,7 @@ class API
|
|||||||
|
|
||||||
protected function buildDynamicQuery(string $tableName): array
|
protected function buildDynamicQuery(string $tableName): array
|
||||||
{
|
{
|
||||||
|
unset($this->baseQuery);
|
||||||
if (!$this->baseQuery) {
|
if (!$this->baseQuery) {
|
||||||
$this->baseQuery = "SELECT * FROM " . $tableName;
|
$this->baseQuery = "SELECT * FROM " . $tableName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ class API_usergroups extends API
|
|||||||
|
|
||||||
$query = "INSERT INTO vc_user_groups (user_group_uuid, user_group_name, user_group_slugify, user_group_weight, user_group_type, user_group_create_timestamp) VALUES (UUID(), ?, ?, ?, ?, ?)";
|
$query = "INSERT INTO vc_user_groups (user_group_uuid, user_group_name, user_group_slugify, user_group_weight, user_group_type, user_group_create_timestamp) VALUES (UUID(), ?, ?, ?, ?, ?)";
|
||||||
$stmt = $this->prepareStatement($query);
|
$stmt = $this->prepareStatement($query);
|
||||||
$stmt->bind_param("ssisi", $this->data['user_group_name'], $this->data['user_group_slugify'], $this->data['user_group_weight'], $this->data['user_group_type'], time());
|
$timestamp = time();
|
||||||
|
$stmt->bind_param("ssisi", $this->data['user_group_name'], $this->data['user_group_slugify'], $this->data['user_group_weight'], $this->data['user_group_type'], $timestamp);
|
||||||
$this->executeStatement($stmt);
|
$this->executeStatement($stmt);
|
||||||
$user_group = $this->getUsergroup();
|
$user_group = $this->getUsergroup();
|
||||||
$user_group_uuid = $user_group[0]['user_group_uuid'];
|
$user_group_uuid = $user_group[0]['user_group_uuid'];
|
||||||
|
|||||||
Reference in New Issue
Block a user