index.php 948 B

123456789101112131415161718192021
  1. <?php
  2. // Show the CAS button to logout to your CAS session
  3. global $_user;
  4. $_template['show_message'] = false;
  5. if (!api_is_anonymous() && api_get_setting('cas_activate') == 'true' && $_user['auth_source'] == CAS_AUTH_SOURCE) {
  6. $_template['show_message'] = true;
  7. // the default title
  8. $logout_label = "Deconnexion de CAS";
  9. if (!empty($plugin_info['settings']['add_cas_logout_button_cas_logout_label'])) {
  10. $logout_label = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_label']);
  11. }
  12. // the comm
  13. $logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']);;
  14. // URL of the image
  15. $logout_image_url = $plugin_info['settings']['add_cas_logout_button_cas_logout_image_url'];
  16. $_template['logout_label'] = $logout_label;
  17. $_template['logout_comment'] = $logout_comment;
  18. $_template['logout_image_url'] = $logout_image_url;
  19. }