-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I'm having some trouble staying logged in with jDrupal 7. I'm using phonegap.
I can perform a successful system_connect, and user_login, but I'm getting "Access denied for user anonymous" when I try a node_save afterwards. If I run an Console.log(Drupal) I can see that user.uid is set to 0, before or after user_login.
I'm not sure what I'm doing wrong. Here's a simplified version of my code:
system_connect({
success: function(result) {
console.log("connected to drupal");
user_login("admin", "password", {
success:function(result){
console.log("logged in");
var node = {
title: "Hello World",
type: "article"
};
node_save(node, {
success: function(result) {
alert("Saved node #" + result.nid);
}
});
},
error:function(xhr, status, message){
alert(message);
}
});
}
});
Metadata
Metadata
Assignees
Labels
No labels