Skip to content

Commit

Permalink
[FEATURE] Document cli backend login
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Jan 19, 2024
1 parent 07d0edf commit 11cc257
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Documentation/ApiOverview/CommandControllers/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ Create a custom command
See the :ref:`Tutorial: Create a console command <console-command-tutorial>`
for details on how to create commands.

DataHandler usage
=================
Using the :ref:`DataHandler <tce-database-basics>` in a cli command will
fail with the following error:

[1.2.1]: Attempt to modify table "pages" without permission

Log in as the `_cli` backend user first to circumvent that problem:

.. code-block:: php
$GLOBALS['BE_USER']->backendCheckLogin();
Read more
==========

Expand Down

0 comments on commit 11cc257

Please sign in to comment.