Update functions.php
This commit is contained in:
parent
1b485e7d45
commit
ba1ad5e71d
|
|
@ -247,14 +247,9 @@
|
|||
function permission_exists($permission) {
|
||||
//set default false
|
||||
$result = false;
|
||||
//search for the permission
|
||||
if (count($_SESSION["permissions"]) > 0) {
|
||||
foreach($_SESSION["permissions"] as $row) {
|
||||
if ($row['permission_name'] == $permission) {
|
||||
$result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//find the permission
|
||||
if (is_array($_SESSION["permissions"]) && $_SESSION["permissions"][$permission] == true) {
|
||||
$result = true;
|
||||
}
|
||||
//return the result
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue