Skip to content

Commit

Permalink
better Logout function
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1064 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
allo committed Nov 12, 2005
1 parent ebac51d commit b74e990
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/de/anomic/data/userDB.java
Expand Up @@ -164,6 +164,12 @@ public Entry proxyAuth(String auth) {
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;
}
}
Expand Down Expand Up @@ -316,7 +322,7 @@ public boolean canSurf(){
//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
Expand Down

0 comments on commit b74e990

Please sign in to comment.