From 2380e8a8af37991018a772ad4a619c6f5c683629 Mon Sep 17 00:00:00 2001 From: Adrian Lang <lang@cosmocode.de> Date: Tue, 22 Jun 2010 16:11:31 +0200 Subject: [PATCH] Hide logout button if auth backend cannot logout --- inc/template.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index 034b1e6dc..15d186a49 100644 --- a/inc/template.php +++ b/inc/template.php @@ -586,7 +586,10 @@ function tpl_get_action($type) { return false; } $params['sectok'] = getSecurityToken(); - if($_SERVER['REMOTE_USER']){ + if(isset($_SERVER['REMOTE_USER'])){ + if (!$auth->canDo('logoff')) { + return false; + } $params['do'] = 'logout'; $type = 'logout'; } -- GitLab