diff options
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index 922faba0..22121015 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -2,6 +2,16 @@ namespace Helper; +function is_current_user($user_id) +{ + return $_SESSION['user']['id'] == $user_id; +} + +function is_admin() +{ + return $_SESSION['user']['is_admin'] == 1; +} + function markdown($text) { require_once __DIR__.'/../vendor/Michelf/MarkdownExtra.inc.php'; |