Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Entry authorId being set from the query url parameters #3326

Merged
merged 1 commit into from Sep 29, 2018
Merged

Allow Entry authorId being set from the query url parameters #3326

merged 1 commit into from Sep 29, 2018

Conversation

bertoost
Copy link
Contributor

When a plugin (or something else) using Entries as data storage it could be useful being able to pre-set the ID of the author of the Entry. Currently this is hard coded to the current user's ID.
With this little update it's possible to pass a query parameter to overwrite it.

Example

Let's say you have a plugin, based on your users. You want a button to create a resource (which is an Entry) and your logic is configured to have the author of an Entry is the user where the resource belongs too. Now you can create that link with the ID of the user to set a different author than the default current user.

@bertoost bertoost changed the title Allow authorId being set from the query url parameters Allow Entry authorId being set from the query url parameters Sep 26, 2018
@brandonkelly brandonkelly merged commit ffb447b into craftcms:develop Sep 29, 2018
@brandonkelly
Copy link
Member

Good idea, thanks!

brandonkelly added a commit that referenced this pull request Sep 29, 2018
@bertoost
Copy link
Contributor Author

nice! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants