how intercept and force the author_id of an entry?
This is an open discussion with 1 reply, filed under Extensions.
Search
Hmm it looks like the author_id
is set when setDataFromPost()
is called on an Entry
object (which in turn calls assignEntryId
). This occurs before the EntryPreCreate
delegate is fired. Once the author_id
is set from the assignEntryId
it is never updated again.
The alternative is to update using SQL within your callback function:
public function forceAuthorId($data) { Symphony::Database()->query(sprintf( "UPDATE sym_entries SET author_id='%d' WHERE entry_id='%d'", 555555, $data['entry']->get('entry_id') )); }
Create an account or sign in to comment.
something like
can someone help me?