Closed pure4Sk closed 8 years ago
I have project in Cordova. I can get nodes just fine, but login dont work. This core:
// Connect to Drupal. jDrupal.connect().then(function() { jDrupal.userLogin('TestUser', '123456').then(function() { var user = jDrupal.currentUser(); alert("user "+jDrupal.currentUser().id()); console.log(JSON.stringify(user)); jDrupal.nodeLoad(146).then(function(node) { alert(node.getTitle()); console.log(JSON.stringify(node)); }); }); });
returns this:
{"entity":{"uid":[{"value":0}],"roles":[{"target_id":"anonymous"}]}}
Whole code: http://paste.ofcode.org/3bradkCYgkLhJcMwzcf8t9k
Solved..seems it needs to be in app folder and Get needs to be set to json too
I have project in Cordova. I can get nodes just fine, but login dont work. This core:
returns this: