mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Added function is_admin (it is used into the ACL of IPAM)
This commit is contained in:
parent
ad23e19a98
commit
be51a825df
@ -735,6 +735,19 @@ function users_get_last_type_message() {
|
||||
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() {
|
||||
$type = users_get_last_type_message();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user