Update authentication.php

Empty the permissions before assigning permission to the user during the login process.
This commit is contained in:
FusionPBX 2024-04-20 22:00:29 -06:00 committed by GitHub
parent 278f1d7453
commit 313de4c6dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -256,6 +256,11 @@ class authentication {
$_SESSION["user"]["username"] = $result["username"];
$_SESSION["user"]["contact_uuid"] = $result["contact_uuid"];
//empty the permissions
if (isset($_SESSION['permissions'])) {
unset($_SESSION['permissions']);
}
//get the groups assigned to the user
$group = new groups($this->database, $result["domain_uuid"], $result["user_uuid"]);
$groups = $group->get_groups();