I stared at what I had written for a bit, then realized, "Well, I've got the responseText, right?" So I eventually came up with this.
I had really liked my .final() clause, because it seemed to identify people for whom I had an email address but who are no longer in the system, so I didn't want to lose that warning, but I want to show user detail for any user who IS in the system. This seems to work:
I had really liked my .final() clause, because it seemed to identify people for whom I had an email address but who are no longer in the system, so I didn't want to lose that warning, but I want to show user detail for any user who IS in the system. This seems to work:
promiseEmail.fail(function() {
hold = promiseEmail.responseText;
var iIndex = hold.indexOf("Login=");
if(iIndex == -1) alert("Whoops! Failed to retrieve logon from email: " + email);
else {
var iEnd = hold.indexOf('"', iIndex+7);
var login = hold.substring(iIndex+7, iEnd);
get_user_profile_by_login(login)
}
});