users.inc 314 B

1234567891011
  1. <?php
  2. $tcmsUsers = json_decode(file_get_contents('config/users.json'),true);
  3. if (!empty($_SERVER['REMOTE_USER']) && !empty($tcmsUsers)) {
  4. $poster = "admin";
  5. if(array_search($_SERVER['REMOTE_USER'], $tcmsUsers) == $_SERVER['REMOTE_USER']) {
  6. $poster = $key;
  7. }
  8. } else {
  9. $poster = "Nobody";
  10. }
  11. ?>