Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that the function setUserState is not a available in the ConsoleApplication, although it is called in the function getUserStateFromRequest. I'm aware that the Console does not have a real user. But it seems that this sinkhole is missing?
I'm trying to build a plugin to run unattended updates. ( in case someone is interested).
Running an update would be as simple as calling Joomla\Component\Installer\Administrator\Model\UpdateModel->update(update id), however this fails since the Model uses setUserState.
As a workaround I could boot the AdministratorApplication from the Console command and use thatt application to run the UpdateModel or would it be better to 'copy' the UpdateModel and remove all the calls of setUserState? Which is annoying since they are in a private function.
Beta Was this translation helpful? Give feedback.
All reactions