PHPackages                             topshelfcraft/impersonator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. topshelfcraft/impersonator

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

topshelfcraft/impersonator
==========================

Who do you want to be?

4.0.0(3y ago)1851proprietaryPHP

Since Jan 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/TopShelfCraft/Impersonator)[ Packagist](https://packagist.org/packages/topshelfcraft/impersonator)[ RSS](/packages/topshelfcraft-impersonator/feed)WikiDiscussions 4.x Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

Impersonator
============

[](#impersonator)

*a plugin for Craft CMS*

**A [Top Shelf Craft](https://topshelfcraft.com) creation**
[Michael Rog](https://michaelrog.com), Proprietor

Who do you want to be?

---

### TL;DR.

[](#tldr)

*Impersonator* provides convenient controller actions for authorized users to impersonate, and *un*-impersonate, other users.

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

[](#installation)

Visit the *Plugin Store* in your Craft control panel, search for **Impersonator**, and click to *Install* the plugin.

Alternatively, install via Composer:

```
composer require topshelfcraft/impersonator

```

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

[](#configuration)

You can configure the form parameter name and the impersonation session duration, via an `impersonator.php` file in your `config` directory:

```
use craft\helpers\App;
use TopShelfCraft\Impersonator\Settings;

return Settings::create()
    ->accountParamName('accountToImpersonate')
    ->impersonatorSessionDuration('P1H');
```

Usage
-----

[](#usage)

### Impersonation

[](#impersonation)

From an authorized user session, submit a POST request to the `impersonator/impersonator/impersonate` action with an identifier (Username, Email, or ID) of the account to impersonate:

```

  {{ csrfInput() }}
  {{ actionInput('impersonator/impersonator/impersonate') }}
  {{ redirectInput('my/start/page/path') }}

  Impersonate!

```

(You can customize the form input `name` by setting the `accountParamName` config item.)

### Template Tags

[](#template-tags)

When an impersonation session is active, the plugin provides some useful info for you to use in your templates:

- The ID of the user performing the impersonation:

    ```
    {{ impersonator.getImpersonatorId() }}
    ```
- The user performing the impersonation:

    ```
    {{ impersonator.getImpersonatorIdentity().fullName }} is impersonating {{ currentUser.fullName }}
    ```

### *Un*-impersonation

[](#un-impersonation)

The plugin keeps track of the session that initiated the impersonation, so you can provide your user a convenient way to end the impersonation and assume their original identity, without needing to log in again (as long as their original session is still valid):

```
{% if impersonator.getImpersonatorId() %}

    {{ csrfInput() }}
    {{ actionInput('impersonator/impersonator/unimpersonate') }}
    {{ redirectInput('my/return/page/path') }}
    Stop Impersonating

{% endif %}
```

Support
-------

[](#support)

Version `4.x` is compatible with Craft 4.0+.

If you've found a bug, or have a question, please open a [GitHub Issue](https://github.com/topshelfcraft/Impersonator/issues), and if you're feeling ambitious, submit a PR.

---

### Contributors:

[](#contributors)

- Plugin development: [Michael Rog](https://michaelrog.com) / @michaelrog
- "Disguise" icon: [Adrien Coquet](https://www.behance.net/coquet_adrien), via [The Noun Project](https://thenounproject.com/icon/disguise-4237095/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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 ~514 days

Total

3

Last Release

1272d ago

Major Versions

3.0.0 → 4.0.02022-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fabbca3f39380eadb6f89517be9a0fbc550159a1eec925452da43d14338de66?d=identicon)[TopShelfCraft](/maintainers/TopShelfCraft)

---

Top Contributors

[![michaelrog](https://avatars.githubusercontent.com/u/102379?v=4)](https://github.com/michaelrog "michaelrog (3 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginimpersonator

### Embed Badge

![Health badge](/badges/topshelfcraft-impersonator/health.svg)

```
[![Health](https://phpackages.com/badges/topshelfcraft-impersonator/health.svg)](https://phpackages.com/packages/topshelfcraft-impersonator)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

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