signalpoint / jDrupal

A JavaScript Library and API for Drupal Applications
http://jdrupal.tylerfrankenstein.com/
GNU General Public License v2.0
76 stars 38 forks source link

Edit user fields - Drupal 8 #42

Open pure4Sk opened 8 years ago

pure4Sk commented 8 years ago

Is it possible to edit user fields via jDrupal? I am working with Cordova and this doesnt seems to work:

jDrupal.userLoad(1).then(function(user) {

                    alert("value "+user.entity.field_test[0].value);

                    user.entity.field_test[0].value="987654";

                    user.save().then(function() {
                        console.log('Saved ');
                    });

                    console.log('Loaded : ' + user.getAccountName());
                });

User would be logged in.

e2o commented 8 years ago

Could you provide some more information? What exactly is not working, is is not saving? What's the error that is returned? Is it HTTP or JS?

Also, take a look at this thread: https://github.com/easystreet3/angular-drupal/issues/31