AnsweredAssumed Answered

Where does the parameter "portalUser" come from?

Question asked by jsn on Mar 21, 2017
Latest reply on Mar 22, 2017 by jsn

Hello everyone,

 

I do not understand very well the notation for this function:    function (portalUser){

 

The parameter "portalUser" where is it populated and declared?

Is there any online converted that changes from AMD to other structure easier to read?

 

 

This function is used in this sample: https://developers.arcgis.com/javascript/3/jssamples/portal_oauth_inline.html

 

Thanks

 

 

 

function displayItems(){
     
new arcgisPortal.Portal(info.portalUrl).signIn().then(
       
function (portalUser){
          console
.log("Signed in to the portal: ", portalUser);

          domAttr
.set("userId", "innerHTML", portalUser.fullName);
          domStyle
.set("anonymousPanel", "display", "none");
          domStyle
.set("personalizedPanel", "display", "block");

          queryPortal
(portalUser);
       
}
     
).otherwise(
       
function (error){
          console
.log("Error occurred while signing in: ", error);
       
}
     
);

Outcomes