freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java
changeset 83 8dd8b041a3e1
parent 82 9ac7acee7d9f
child 85 3574b08dc3c3
     1.1 --- a/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Sun Sep 13 16:48:54 2009 +0200
     1.2 +++ b/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Sun Sep 13 20:07:32 2009 +0200
     1.3 @@ -75,10 +75,14 @@
     1.4  
     1.5      private Viewable checkLogin() {
     1.6          if (headers.getCookies().containsKey("login")) {
     1.7 -            uuid = headers.getCookies().get("login").getValue();
     1.8 -            user = base.path("login").queryParam("id", uuid).
     1.9 +            String id = headers.getCookies().get("login").getValue();
    1.10 +            String us = base.path("login").queryParam("id", id).
    1.11                  accept(MediaType.TEXT_PLAIN).get(String.class);
    1.12 -            return null;
    1.13 +            if (us.length() > 0) {
    1.14 +                user = us;
    1.15 +                uuid = id;
    1.16 +                return null;
    1.17 +            }
    1.18          }
    1.19          return viewable("login.fmt", null);
    1.20      }