You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isadmin.php 518B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Lukas Reschke <lukas@statuscode.ch>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. // Set the content type to Javascript
  9. header("Content-type: text/javascript");
  10. // Disallow caching
  11. header("Cache-Control: no-cache, must-revalidate");
  12. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
  13. if (OC_User::isAdminUser(OC_User::getUser())) {
  14. echo("var isadmin = true;");
  15. } else {
  16. echo("var isadmin = false;");
  17. }