|
|
|
@ -124,9 +124,24 @@ define([
|
|
|
|
|
|
|
|
|
|
/* if the user is registering, we expect that the userDoc will be empty
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
var proxykeys = Object.keys(proxy);
|
|
|
|
|
|
|
|
|
|
if (opt.register) {
|
|
|
|
|
if (Object.keys(proxy).length) {
|
|
|
|
|
if (proxyKeys.length) {
|
|
|
|
|
// user is trying to register, but the userDoc is not empty
|
|
|
|
|
// tell them they are already registered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alreadyExists();
|
|
|
|
|
} else {
|
|
|
|
|
// trying to register, and the object is empty, as expected
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (proxyKeys.length) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -196,6 +211,7 @@ define([
|
|
|
|
|
$register[0].checked = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Cryptpad.ready(function () {
|
|
|
|
|
if (Cryptpad.getUserHash()) {
|
|
|
|
|
//Cryptpad.alert("You are already logged in!");
|
|
|
|
|
$logoutBox.slideDown();
|
|
|
|
@ -232,4 +248,5 @@ define([
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|