mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Added function is_admin (it is used into the ACL of IPAM)
This commit is contained in:
parent
7d536434c0
commit
fc07396e53
@ -735,6 +735,19 @@ function users_get_last_type_message() {
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function users_is_admin($id_user = false) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if ($id_user === false) {
|
||||||
|
$id_user = $config['id_user'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_admin = (bool)db_get_value('is_admin',
|
||||||
|
'tusuario', 'id_user', $id_user);
|
||||||
|
|
||||||
|
return $is_admin;
|
||||||
|
}
|
||||||
|
|
||||||
function users_is_last_system_message() {
|
function users_is_last_system_message() {
|
||||||
$type = users_get_last_type_message();
|
$type = users_get_last_type_message();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user