Update auth.php
This commit is contained in:
@@ -10,17 +10,20 @@ if (session_status() === PHP_SESSION_NONE) {
|
||||
function isAdminPemerintah() {
|
||||
return (
|
||||
isset($_SESSION['role']) &&
|
||||
$_SESSION['role'] === 'admin_pemerintah'
|
||||
(
|
||||
$_SESSION['role'] === 'admin_pemerintah' ||
|
||||
$_SESSION['role'] === 'admin'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cek apakah user adalah Admin Rumah Ibadah
|
||||
*/
|
||||
function isAdminIbadah() {
|
||||
return (
|
||||
isset($_SESSION['role']) &&
|
||||
$_SESSION['role'] === 'admin_ibadah'
|
||||
(
|
||||
$_SESSION['role'] === 'admin_ibadah' ||
|
||||
$_SESSION['role'] === 'operator'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user