From fc8d8b840bbe30c14de6ae1b905fc237caa9d00d Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Wed, 30 Jun 2010 17:23:39 +0000 Subject: [PATCH] Move the UNL CAS logout link modification code from a javascript call to the <link rel="logout"> tag. Also add the return url to cas logouts. git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@117 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/unl_cas.module | 12 +----------- sites/all/themes/unl_wdn/html.tpl.php | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sites/all/modules/unl/unl_cas.module b/sites/all/modules/unl/unl_cas.module index 4d2a50f7..8ecc1c6a 100644 --- a/sites/all/modules/unl/unl_cas.module +++ b/sites/all/modules/unl/unl_cas.module @@ -94,7 +94,7 @@ function unl_cas_form_alter(&$form, $form_state, $form_id) function unl_cas_user_logout($account) { $cas = unl_cas_get_adapter(); - drupal_goto($cas->getLogoutUrl()); + drupal_goto($cas->getLogoutUrl(url('<front>', array('absolute' => TRUE)))); } function unl_cas_import_user($username) @@ -120,13 +120,3 @@ function unl_cas_import_user($username) return $user; } -function unl_cas_page_alter(&$page) -{ - $logoutUrl = url('user/logout'); - $ssoScript = <<<EOF -<script type="text/javascript"> - WDN.idm.setLogoutURL('$logoutUrl'); -</script> -EOF; - $page['page_bottom']['sso']['#markup'] = $ssoScript; -} diff --git a/sites/all/themes/unl_wdn/html.tpl.php b/sites/all/themes/unl_wdn/html.tpl.php index dfd532d8..15efb091 100644 --- a/sites/all/themes/unl_wdn/html.tpl.php +++ b/sites/all/themes/unl_wdn/html.tpl.php @@ -39,6 +39,7 @@ $t->head .= PHP_EOL . $styles . PHP_EOL . $scripts . PHP_EOL . '<link href="' . url('<front>', array('absolute' => TRUE)) . '" rel="home" />' . PHP_EOL + . '<link rel="logout" href="user/logout" title="Log out of myapp" />' . PHP_EOL ; if (theme_get_setting('use_base')) { -- GitLab