title: Why does jQuery.getJSON return no data?
body: <p>I have this method: </p>
  
  <pre><code>function getUserName(guid) {
      var name = "Unbekannt";
  
      $.getJSON(urlCurrent, {
          "method" : "get_user_info",
          "guid" : guid,
          "auth_token" : temporaryAuthToken
      }, function(data) {
          if (data.status == 0) {
              alert(data.result[0].name);
              name = data.result[0].name;
          }
      });
  
      return name;
  }
  </code></pre>
  
  <p>Nearly all is working: the Ajax-Request gets data and fires the callback-function, so that</p>
  
  <pre><code>alert(data.result[0].name);
  </code></pre>
  
  <p>shows a popup with this value: "Forename Surname"</p>
  
  <p>But then at </p>
  
  <pre><code>return name;
  </code></pre>
  
  <p>the method returns "Unbekannt", although name should have the new value "Forename Surname".
  What happened and where´s the mistake?</p>
  
  <p>Thx a lot</p>