Add permissions only if there are groups assigned to the user.
This commit is contained in:
parent
2070de705e
commit
9458e5b51e
|
|
@ -303,6 +303,7 @@ require_once "resources/require.php";
|
|||
unset($sql, $row_count, $prep_statement);
|
||||
|
||||
//get the permissions assigned to the groups that the user is a member of set the permissions in $_SESSION['permissions']
|
||||
if (count($_SESSION["groups"]) > 0) {
|
||||
$x = 0;
|
||||
$sql = "select distinct(permission_name) from v_group_permissions ";
|
||||
foreach($_SESSION["groups"] as $field) {
|
||||
|
|
@ -320,6 +321,7 @@ require_once "resources/require.php";
|
|||
$prep_statement_sub->execute();
|
||||
$_SESSION['permissions'] = $prep_statement_sub->fetchAll(PDO::FETCH_NAMED);
|
||||
unset($sql, $prep_statement_sub);
|
||||
}
|
||||
|
||||
//get the user settings
|
||||
$sql = "select * from v_user_settings ";
|
||||
|
|
|
|||
Loading…
Reference in New Issue