PHPackages                             adamkiss/kirby-impersonate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. adamkiss/kirby-impersonate

ActiveKirby-plugin[Authentication &amp; Authorization](/categories/authentication)

adamkiss/kirby-impersonate
==========================

Impersonate users in Kirby CMS Panel

0.6.1(2y ago)0391MITPHP

Since Apr 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/adamkiss/kirby-impersonate)[ Packagist](https://packagist.org/packages/adamkiss/kirby-impersonate)[ RSS](/packages/adamkiss-kirby-impersonate/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Kirby Impersonate: Panel actions for impersonating users
========================================================

[](#kirby-impersonate-panel-actions-for-impersonating-users)

This plugin allows impersonating users in your panel and/or frontend, by adding a session mark for "user is being impersonated" and then forcibly calling `kirby()->impersonate()` with the target user.

Installation
------------

[](#installation)

```
composer require adamkiss/kirby-impersonate
```

As with all Kirby plugins, downloading zip should also work. As should using git submodules, but I never tested that.

Usage
-----

[](#usage)

If you want to use this plugin only for your panel debugging, just install it, potentially configure who can impersonate/be impersonated and you're done. If you also want to test different frontend availability, you can change where the admin gets redirect after they start impersonation, and the frontend should *just* work as if it was the user being impersonated.

For notification about ongoing impersonation, you can use `kirby()->user()->isImpersonated()`, and you can use the route `/__impersonate/stop` to stop impersonation. For instance, using following in your template:

```

```

Configuration
-------------

[](#configuration)

By default, any user with access to users table can impersonate any other user. At the start of the impersonation, window reload happens, and at the end of the impersonation, you'll be redirected to users view in the panel; All of these are configurable via options:

```
// config.php
return [
	'adamkiss.kirby-impersonate' => [
		'can-impersonate' => function () {
			// who can impersonate? this is a user method,
			// so "$this" is a user who's checked.
			// you have access to role, email, uuid…

			/** @var User $this */
			return true;
		},
		'can-be-impersonated' => function () {
			// who can be target of impersonation? this is a user method,
			// so "$this" is a user who's checked
			// you have access to role, email, uuid…

			/** @var User $this */
			return true;
		},

		// Since the start of redirection is in the users area, null just reloads
		// You can also use a string to get a URL, or a Closure with the impersonated user
		// if you need different redirects base on role / email / whatever
		'redirect-after-impersonation-start' => null,

		// Where you're redirected after the impersonation stops
		// this can be only a string
		'redirect-after-impersonation-stop' => kirby()->url('panel') . '/users',    ]
];
```

License
-------

[](#license)

MIT, (c) 2024 Adam Kiss

See LICENSE.md for more information

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

798d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8eb0379405b0057e59868aa52d6763c48bf909926aa626c51eaade5246b8415d?d=identicon)[adamkiss](/maintainers/adamkiss)

---

Top Contributors

[![adamkiss](https://avatars.githubusercontent.com/u/481362?v=4)](https://github.com/adamkiss "adamkiss (11 commits)")

### Embed Badge

![Health badge](/badges/adamkiss-kirby-impersonate/health.svg)

```
[![Health](https://phpackages.com/badges/adamkiss-kirby-impersonate/health.svg)](https://phpackages.com/packages/adamkiss-kirby-impersonate)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k584.8k475](/packages/getkirby-cms)[medienbaecker/kirby-modules

Easily add modules to your pages

895.5k1](/packages/medienbaecker-kirby-modules)[thathoff/kirby-oauth

Kirby OAuth 2 Plugin

3926.4k](/packages/thathoff-kirby-oauth)[sylvainjule/bouncer

Restrict access of a user role to a specific page (and its children) in the panel.

673.7k](/packages/sylvainjule-bouncer)[johannschopplich/kirby-content-translator

DeepL &amp; AI-powered content translation for Kirby CMS

2010.8k](/packages/johannschopplich-kirby-content-translator)[medienbaecker/kirby-alter

242.1k](/packages/medienbaecker-kirby-alter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
