Skip to content
Snippets Groups Projects
Commit 6481b022 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-222] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1060 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 67e809a6
Branches
Tags
No related merge requests found
......@@ -18,9 +18,11 @@ function unl_cas_init() {
return;
}
// If the current user's CAS ticket is expired or doesn't exist, renew their CAS session.
// If the user's CAS service ticket is expired, and their drupal session hasn't,
// redirect their next GET request to CAS to keep their CAS session active.
// However, if their drupal session expired (and they're now anonymous), redirect them regardless.
$cas = unl_cas_get_adapter();
if ($cas->isTicketExpired()) {
if ($cas->isTicketExpired() && ($_SERVER['REQUEST_METHOD'] == 'GET' || user_is_anonymous())) {
$cas->setGateway();
drupal_goto($cas->getLoginUrl());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment