Commit c000c60f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Optimization - keep info if user is anonymous.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8341 b35dd754-fafc-0310-a699-88a17e54d16e
parent 519a54f5
...@@ -23,6 +23,7 @@ public class AuthToken { ...@@ -23,6 +23,7 @@ public class AuthToken {
private static final long serialVersionUID = 01L; private static final long serialVersionUID = 01L;
private String username; private String username;
private Boolean anonymous;
/** /**
* Constucts a new AuthToken with the specified username. * Constucts a new AuthToken with the specified username.
...@@ -48,6 +49,9 @@ public class AuthToken { ...@@ -48,6 +49,9 @@ public class AuthToken {
* @return true if this token is the anonymous AuthToken. * @return true if this token is the anonymous AuthToken.
*/ */
public boolean isAnonymous() { public boolean isAnonymous() {
return username == null || !UserManager.getInstance().isRegisteredUser(username); if (anonymous == null) {
anonymous = username == null || !UserManager.getInstance().isRegisteredUser(username);
}
return anonymous;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment