Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295321

Automatically populate uid on POST requests

$
0
0

Problem/Motivation

Currently, if a JSON object is posted with just the type and title set, it fails if comment module is turned on because comment is looking for $node->uid. It should be possible to post without explicitly stating who you are, since we already know that from your user.

Proposed resolution

Check whether the entity has a uid property, and if it does and it is not set, populate it with the requesting user's uid.


Viewing all articles
Browse latest Browse all 295321

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>