index.php 993 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Show the CAS button to login using CAS
  3. require_once api_get_path(SYS_PATH).'main/auth/cas/authcas.php';
  4. $_template['show_message'] = false;
  5. if (api_is_anonymous()) {
  6. $_template['cas_activated'] = api_is_cas_activated();
  7. $_template['cas_configured'] = cas_configured();
  8. $_template['show_message'] = true;
  9. // the default title
  10. $button_label = "Connexion via CAS";
  11. if (!empty($plugin_info['settings']['add_cas_login_button_cas_button_label'])) {
  12. $button_label = api_htmlentities(
  13. $plugin_info['settings']['add_cas_login_button_cas_button_label']
  14. );
  15. }
  16. // the comm
  17. $comm_label = api_htmlentities(
  18. $plugin_info['settings']['add_cas_login_button_cas_button_comment']
  19. );;
  20. // URL of the image
  21. $url_label = $plugin_info['settings']['add_cas_login_button_cas_image_url'];
  22. $_template['button_label'] = $button_label;
  23. $_template['comm_label'] = $comm_label;
  24. $_template['url_label'] = $url_label;
  25. }