Make sure the login_name is in the object
This commit is contained in:
1 parent
b1b294aade
commit
bff9d05210
2 files changed
+6
No files matched your search
@@ -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/';
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user