From bbd0455463715b26c99c05a2a4d132d51a39cc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Paix=C3=A3o?= Date: Tue, 12 Mar 2019 11:35:02 -0300 Subject: [PATCH] Admin Page - Compatibility OTHire (#342) -- Fix for Admin Page in OTHire --- engine/function/general.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/function/general.php b/engine/function/general.php index 1cfaf70..031d0d0 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -404,7 +404,10 @@ function admin_only($user_data) { } function is_admin($user_data) { - return in_array($user_data['name'], config('page_admin_access')) ? true : false; + if (config('ServerEngine') === 'OTHIRE') + return in_array($user_data['id'], config('page_admin_access')) ? true : false; + else + return in_array($user_data['name'], config('page_admin_access')) ? true : false; } function array_sanitize(&$item) { @@ -557,4 +560,4 @@ function verifyGoogleReCaptcha($postResponse = null) { return isset($json->success) && $json->success; } -?> \ No newline at end of file +?>