summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/actions.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/actions.php b/inc/actions.php
index 09042885e..091a477a3 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -185,12 +185,18 @@ function act_save($act){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function act_auth($act){
+ global $ID;
+
//already logged in?
if($_SERVER['REMOTE_USER'] && $act=='login')
return 'show';
//handle logout
if($act=='logout'){
+ $lockedby = checklock($ID); //page still locked?
+ if($lockedby == $_SERVER['REMOTER_USER'])
+ unlock($ID); //try to unlock
+
auth_logoff();
return 'login';
}