Make sure the login_name is in the object
This commit is contained in:
parent
b1b294aade
commit
bff9d05210
@ -122,6 +122,9 @@ define([
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// successful validation and user already exists
|
// successful validation and user already exists
|
||||||
// set user hash in localStorage and redirect to drive
|
// 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 () {
|
Cryptpad.login(result.userHash, result.userName, function () {
|
||||||
document.location.href = '/drive/';
|
document.location.href = '/drive/';
|
||||||
});
|
});
|
||||||
|
|||||||
@ -74,6 +74,9 @@ define([
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// successful validation and user already exists
|
// successful validation and user already exists
|
||||||
// set user hash in localStorage and redirect to drive
|
// 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 () {
|
Cryptpad.login(result.userHash, result.userName, function () {
|
||||||
document.location.href = '/drive/';
|
document.location.href = '/drive/';
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user