Fix invalid session after signing up
This commit is contained in:
parent
b6733a3f3d
commit
2278bf588d
@ -81,11 +81,22 @@ function dosignup() {
|
|||||||
},
|
},
|
||||||
function (data) {
|
function (data) {
|
||||||
if (data === 'OK') {
|
if (data === 'OK') {
|
||||||
username = $('#usernameBox').val().toLowerCase();
|
$.getJSON(mkApiUrl('pinglogin') + "?user=" + $('#usernameBox').val(), function (out) {
|
||||||
password = $('#passwordBox').val();
|
if (out.status === 'OK') {
|
||||||
localStorage.setItem("username", username);
|
username = $('#usernameBox').val().toLowerCase();
|
||||||
localStorage.setItem("password", password);
|
password = $('#passwordBox').val();
|
||||||
checkUserHasTeamOpenChooserIfNot(username);
|
localStorage.setItem("username", username);
|
||||||
|
localStorage.setItem("password", password);
|
||||||
|
navigator.splashscreen.hide();
|
||||||
|
checkUserHasTeamOpenChooserIfNot(username);
|
||||||
|
} else {
|
||||||
|
navigator.notification.alert("You've signed up successfully, but we can't log you in. Restart the app and try again.", null, "Error", 'Dismiss');
|
||||||
|
authOpInProgress = false;
|
||||||
|
}
|
||||||
|
}).fail(function (err) {
|
||||||
|
navigator.notification.alert("You've signed up successfully, but we can't log you in. Restart the app and try again.", null, "Error", 'Dismiss');
|
||||||
|
authOpInProgress = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#signupBtn').html('<i class="fa fa-user-plus"></i> Sign Up');
|
$('#signupBtn').html('<i class="fa fa-user-plus"></i> Sign Up');
|
||||||
$('#signupBtn').attr('disabled', false);
|
$('#signupBtn').attr('disabled', false);
|
||||||
|
Reference in New Issue
Block a user