Commit b922116c authored by Tim Steiner's avatar Tim Steiner
Browse files

Add the option for a return URL when generating the logout URL.

parent d2d620eb
......@@ -261,9 +261,13 @@ class Unl_Cas
* Returns the URL to the CAS logout page.
* Intended usage: $this->_redirect($cas->getLogoutUrl());
*/
public function getLogoutUrl()
public function getLogoutUrl($returnUrl = '')
{
return $this->_casUrl . '/logout';
$url = $this->_casUrl . '/logout';
if ($returnUrl) {
$url .= '?url=' . urlencode($returnUrl);
}
return $url;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment