aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Login.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Login.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Login.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Login.java b/juick-www/src/main/java/com/juick/www/Login.java
index 155f58d5..0ec63a8e 100644
--- a/juick-www/src/main/java/com/juick/www/Login.java
+++ b/juick-www/src/main/java/com/juick/www/Login.java
@@ -34,7 +34,7 @@ public class Login {
protected void doGetLoginForm(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor.getUID() > 0) {
Utils.sendTemporaryRedirect(response, "/");
return;
}
@@ -228,7 +228,7 @@ public class Login {
protected void doGetLogout(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor.getUID() > 0) {
sql.update("DELETE FROM logins WHERE user_id=?", visitor.getUID());
}