App42.initialize(constval.API, constval.KEY);
var userCode = App42.getLoggedInUser();
var userService = new App42User();
userService.getUser(userCode, {
success : function(object) {
try {
var userObj = JSON.parse(object);
result = userObj.app42.response.users.user;
$('#profiloEmail').text(result.email);
$("#profilePageLoader").hide();
} catch (error) {
console.log(error.message);
}
},
error : function(error) {
$("#profilePageLoader").hide();
showPageLoadingError("Utente NON trovato.", 5000);
}
});
Hello,
When I execute this code for the first time I get an Un Authorized Access Error
If I do it for the second time it work correctly. I need to read the email associated to a user.