function validate_authentication(){
var is_authenticated = false;
$.ajax({
type: "POST",
url: "/account/islogin/",
data: "",
async: "false",
success: function(data) {
if (data == "null") {
signup();
is_authenticated = false;
}
is_authenticated = true;
}
});
return is_authenticated;
};
Why does the function always return false
, even though is_authenticated=true
is executed.