diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-22 16:11:12 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-22 16:11:12 -0500 |
| commit | fa9d1c62c8cc4b39caee69b1ba31401f0d4aac66 (patch) | |
| tree | be7de3febad13a0ba77aa02e19f9527df81549d1 /StoneIsland/www/js/lib/auth | |
| parent | 46bca0d394d4c327d692a081f9afedcf7e05c146 (diff) | |
keep user object around after login
Diffstat (limited to 'StoneIsland/www/js/lib/auth')
| -rw-r--r-- | StoneIsland/www/js/lib/auth/LoginView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/auth/LogoutView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/auth/SignupView.js | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/auth/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js index 86cf7159..701a6a36 100644 --- a/StoneIsland/www/js/lib/auth/LoginView.js +++ b/StoneIsland/www/js/lib/auth/LoginView.js @@ -32,6 +32,7 @@ var LoginView = FormView.extend({ }, success: function(data){ + // console.log(data) app.account.logged_in() }, diff --git a/StoneIsland/www/js/lib/auth/LogoutView.js b/StoneIsland/www/js/lib/auth/LogoutView.js index feb264dd..735c0242 100644 --- a/StoneIsland/www/js/lib/auth/LogoutView.js +++ b/StoneIsland/www/js/lib/auth/LogoutView.js @@ -8,7 +8,8 @@ var LogoutView = View.extend({ show: function(){ document.body.className = "logout" app.footer.hide() - app.account.log_out() + app.account.logged_out() + auth.clear_user() }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index 367bd356..0fccc06d 100644 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/www/js/lib/auth/SignupView.js @@ -3,6 +3,7 @@ var SignupView = FormView.extend({ el: "#signup", action: sdk.account.signup, + last_data: null, events: { "click .privacy-msg": "privacy_link", @@ -47,6 +48,8 @@ var SignupView = FormView.extend({ delete data.DataProfiling2 delete data.ConfirmEmail + + this.last_data = data console.log(data) }, @@ -63,6 +66,10 @@ var SignupView = FormView.extend({ success: function(data){ console.log('success', data) + auth.user = auth.user || {} + auth.user.name = this.last_data.Name + auth.user.surname = this.last_data.Surname + auth.user.email = this.last_data.Email app.account.logged_in() }, |
