reenadak

function to check admin using session in common.php

Sep 25th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. function isAdmin()
  2. {
  3. if(!isset($_SESSION['oauth_user']['email'])) return false;
  4. $admin_list = array("mukeshdak@gmail.com", "gpp.scl@gmail.com");
  5. return in_array( $_SESSION['oauth_user']['email'], $admin_list) ? true : false;
  6. }
Add Comment
Please, Sign In to add comment