diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-20 23:58:19 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-20 23:58:19 +1300 |
commit | b26e487f3c65808d349c7a53c0ea2a3981b61bac (patch) | |
tree | 57873f966be2953f3cb6b6f518cd44ea1adf720c /src/org/traccar/web/client/controller/LoginController.java | |
parent | 6801698dfc9c99b34d7ed081ebcfbec4a8853868 (diff) | |
download | trackermap-web-b26e487f3c65808d349c7a53c0ea2a3981b61bac.tar.gz trackermap-web-b26e487f3c65808d349c7a53c0ea2a3981b61bac.tar.bz2 trackermap-web-b26e487f3c65808d349c7a53c0ea2a3981b61bac.zip |
Add user preferences
Diffstat (limited to 'src/org/traccar/web/client/controller/LoginController.java')
-rw-r--r-- | src/org/traccar/web/client/controller/LoginController.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/web/client/controller/LoginController.java b/src/org/traccar/web/client/controller/LoginController.java index d2b65ff5..06471377 100644 --- a/src/org/traccar/web/client/controller/LoginController.java +++ b/src/org/traccar/web/client/controller/LoginController.java @@ -36,10 +36,11 @@ public class LoginController implements LoginDialog.LoginHandler { public void login(final LoginHandler loginHandler) { this.loginHandler = loginHandler; - Application.getDataService().authenticated(new BaseAsyncCallback<Boolean>() { + Application.getDataService().authenticated(new BaseAsyncCallback<User>() { @Override - public void onSuccess(Boolean result) { - if (result) { + public void onSuccess(User result) { + if (result != null) { + ApplicationContext.getInstance().setUser(result); loginHandler.onLogin(); } else { dialog = new LoginDialog(LoginController.this); |