![QUIQQER Master Login](bin/images/Readme.jpg)

QUIQQER Master Login
========

The QUIQQER Master Login module lets you authenticate as any user in your system in the frontend. 

Package Name:

    quiqqer/masterlogin


Features
--------
* Master Login Bar in the frontend
  * Comfortably search for users in the system and authenticate with their user account
  * Optionally hide the bar in order to not block any frontend elements
  * Re-log back to your original account via simple click
* Fine control who is allowed to use master login and which user accounts are eligible for being authenticated as

Installation
------------
Install the package through Composer:

```shell
composer require quiqqer/masterlogin
```

Then run the QUIQQER package setup so permissions, settings, events, and the log table are imported.

Configuration
-------------
Grant `quiqqer.masterlogin.can_use` only to trusted users. The
`quiqqer.masterlogin.slaves` permission can limit which users and groups they may impersonate. An empty slave list permits
access to every user account. Detailed diagnostic file logging can be enabled or disabled in the package settings.

Usage
-----
Authorized users see the Master Login bar in the frontend. Use its user search to switch accounts and the return action to
restore the original session user.

## Audit and diagnostics

Every Master Login session is recorded in the structured database audit. Administrators with the
`quiqqer.masterlogin.audit.view` permission can search and sort these entries under **Logs > Master Login audit**. Audit
entries are retained for 90 days by default.

Detailed diagnostic logging is separate and can be enabled or disabled in the package settings. When enabled, additional
Master Login, session, permission and user events are written to the `masterlogin-user-events` log file. The audit ID shown
in the backend panel correlates a database entry with these optional diagnostic details.

Technical notes
---------------
Master Login sessions are always recorded in the package audit table. Detailed file logging is optional. The package
requires PHP 8.2 or newer and QUIQQER Core 2.25.1 or newer.

Contribute
----------
- Project: https://dev.quiqqer.com/quiqqer/masterlogin
- Issue Tracker: https://dev.quiqqer.com/quiqqer/masterlogin/-/issues
- Source Code: https://dev.quiqqer.com/quiqqer/masterlogin

Support
-------
If you have found errors, wishes or suggestions for improvement,
you can contact us by email at support@pcsg.de.

We will try to meet your needs or send them to the responsible developers
of the project.

License
-------
GPL-3.0-or-later. See [LICENSE](LICENSE).
