From bff9d05210ee0f2fb47a56f003f612df9cafd30d Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 13 Feb 2017 11:15:30 +0100 Subject: [PATCH] Make sure the login_name is in the object --- customize.dist/main.js | 3 +++ www/login/main.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/customize.dist/main.js b/customize.dist/main.js index 9397709aa..766977f0d 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -122,6 +122,9 @@ define([ if (!err) { // successful validation and user already exists // set user hash in localStorage and redirect to drive + if (result.proxy && !result.proxy.login_name) { + result.proxy.login_name = result.userName; + } Cryptpad.login(result.userHash, result.userName, function () { document.location.href = '/drive/'; }); diff --git a/www/login/main.js b/www/login/main.js index 7b2b8ca6f..a6273b469 100644 --- a/www/login/main.js +++ b/www/login/main.js @@ -74,6 +74,9 @@ define([ if (!err) { // successful validation and user already exists // set user hash in localStorage and redirect to drive + if (result.proxy && !result.proxy.login_name) { + result.proxy.login_name = result.userName; + } Cryptpad.login(result.userHash, result.userName, function () { document.location.href = '/drive/'; });