Admin Page - Compatibility OTHire (#342)

-- Fix for Admin Page in OTHire
This commit is contained in:
Rodrigo Paixão 2019-03-12 11:35:02 -03:00 committed by Stefan A. Brannfjell
parent 9c80585ef9
commit bbd0455463

View File

@ -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;
}
?>
?>