Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

better Logout function

allob74e990c743b
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