Skip to content

Commit

Permalink
Doc for hooks account enable/disable
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Nov 29, 2024
1 parent 056870d commit 5c6d06b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docs/hook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Hook feature allows to run a script before or after an action:
* Password reset
* Password lock
* Password unlock
* Account enable
* Account disable

The script must return 0 if no error occured. Any text printed on STDOUT
will be displayed as an error message (see options).
Expand Down Expand Up @@ -107,3 +109,53 @@ To ignore prehook error:
.. code-block:: php
$ignore_prehook_unlock_error = true;
Account enable
--------------

The script is called with one parameter: login.

Define prehook or posthook script (and enable the feature):

.. code-block:: php
$prehook_enable = "/usr/share/service-desk/prehook_enable.sh";
$posthook_enable = "/usr/share/service-desk/posthook_enable.sh";
To display hook error:

.. code-block:: php
$display_prehook_enable_error = true;
$display_posthook_enable_error = true;
To ignore prehook error:

.. code-block:: php
$ignore_prehook_enable_error = true;
Account disable
---------------

The script is called with one parameter: login.

Define prehook or posthook script (and disable the feature):

.. code-block:: php
$prehook_disable = "/usr/share/service-desk/prehook_disable.sh";
$posthook_disable = "/usr/share/service-desk/posthook_disable.sh";
To display hook error:

.. code-block:: php
$display_prehook_disable_error = true;
$display_posthook_disable_error = true;
To ignore prehook error:

.. code-block:: php
$ignore_prehook_disable_error = true;

0 comments on commit 5c6d06b

Please sign in to comment.