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. adamkiss/kirby-impersonate

ActiveKirby-plugin

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

Impersonate users in Kirby CMS Panel

0.6.1(2y ago)0371MITPHP

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 1mo 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 10% 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

745d 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.5k535.5k352](/packages/getkirby-cms)[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[getkirby/staticache

Static site performance on demand

9615.4k](/packages/getkirby-staticache)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

6910.7k1](/packages/fabianmichael-kirby-meta)[thathoff/kirby-oauth

Kirby OAuth 2 Plugin

3823.9k](/packages/thathoff-kirby-oauth)

PHPackages © 2026

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