From b74e990c743bc14edc0701709fdc85e6b4307172 Mon Sep 17 00:00:00 2001 From: allo Date: Sat, 12 Nov 2005 12:09:45 +0000 Subject: [PATCH] better Logout function git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1064 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/userDB.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.java index 2385a4017..0a85b9ec9 100644 --- a/source/de/anomic/data/userDB.java +++ b/source/de/anomic/data/userDB.java @@ -164,6 +164,12 @@ public final class userDB { if(tmp.length == 2){ entry=this.getEntry(tmp[0]); if( entry != null && entry.getMD5EncodedUserPwd().equals(serverCodings.encodeMD5Hex(auth)) ){ + if(entry.isLoggedOut()){ + try{ + entry.setProperty(Entry.LOGGED_OUT, "false"); + }catch(IOException e){} + return null; + } return entry; } } @@ -316,7 +322,7 @@ public final class userDB { //TODO: more returnvalues. //Exception if false, or CONSTANTS long timeUsed=this.updateLastAccess(true); - if(this.hasProxyRight() == false || this.isLoggedOut()) + if(this.hasProxyRight() == false) return false; if( this.getTimeLimit() == null || this.getTimeLimit().longValue() <= 0 || ( timeUsed < this.getTimeLimit().longValue()) )//no timelimit or timelimit not reached