PHPackages                             flagrow/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. flagrow/impersonate

Abandoned → [fof/impersonate](/?search=fof%2Fimpersonate)Flarum-extension[Authentication &amp; Authorization](/categories/authentication)

flagrow/impersonate
===================

Login as other users of your forum

1.2.0(1y ago)96.4k2MITPHPCI passing

Since Mar 7Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/FriendsOfFlarum/impersonate)[ Packagist](https://packagist.org/packages/flagrow/impersonate)[ Docs](https://friendsofflarum.org)[ Fund](https://opencollective.com/fof/donate)[ RSS](/packages/flagrow-impersonate/feed)WikiDiscussions 2.x Synced 4w ago

READMEChangelog (10)Dependencies (2)Versions (25)Used By (0)

Impersonate by FriendsOfFlarum
==============================

[](#impersonate-by-friendsofflarum)

[![MIT license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/FriendsOfFlarum/impersonate/blob/master/LICENSE.md) [![Latest Stable Version](https://camo.githubusercontent.com/36903e0b9e6e79c4ce71268fb291cde8dbb54a3810ae426b58158c4a214b979c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666f662f696d706572736f6e6174652e737667)](https://packagist.org/packages/fof/impersonate) [![Total Downloads](https://camo.githubusercontent.com/502daf06154ce10c1ca34acbd074e0780f29b5ae3cc5a9f21ac8b907cb6cc5cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666f662f696d706572736f6e6174652e737667)](https://packagist.org/packages/fof/impersonate) [![OpenCollective](https://camo.githubusercontent.com/1903c197bb0307e60d6328653532b8a6b9890b898fbc92e314ab39d699491e74/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f70656e636f6c6c6563746976652d666f662d626c75652e737667)](https://opencollective.com/fof/donate)

This extension adds a "Log in as user" button on user profiles for administrators and others who are granted the permission — and a way back: while impersonating, a notice is shown with a **Return to {username}** button that switches you back to your own account.

Features
--------

[](#features)

- **Impersonate users** from their user profile (moderation controls) or from the admin panel's user list.
- **Return to your own account** without logging out: a persistent notice (and an entry in the user menu) offers "Return to {username}" for the whole impersonation session. If you logged in with "remember me", that is restored when you return.
- **Require a reason** (optional setting): impersonation can require a reason, which is recorded in the audit log ([flarum/audit](https://github.com/flarum/audit)) and/or as moderator notes on both accounts ([fof/moderator-notes](https://github.com/FriendsOfFlarum/moderator-notes)), whichever is enabled.
- **Audit logging**: with flarum/audit enabled, both starting and ending an impersonation are written to the audit log.
- **No activity traces**: browsing as an impersonated user does not update their "last seen" time and never shows them as online. Their own devices are unaffected.

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

[](#installation)

Install manually:

```
composer require fof/impersonate:"*"
```

Updating
--------

[](#updating)

```
composer update fof/impersonate
php flarum migrate
php flarum cache:clear
```

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

[](#configuration)

You can configure which groups can impersonate users by going to *Permissions &gt; Login as other users*. Use with caution, as anybody with that permission can easily access the private data of every user on the forum.

The *require a reason* setting appears once flarum/audit or fof/moderator-notes is enabled, since one of them is needed to record it.

Security model
--------------

[](#security-model)

- **Non-admins cannot impersonate an admin account**, and nobody can impersonate themselves.
- Permissions are checked against your **real current identity**: an impersonated session never inherits the impersonator's ability to impersonate.
- Returning is bound to the session and to the exact account that was impersonated. It stops working when you log out, when the session expires (one hour of inactivity), or after logging into a different account — from then on, only credentials get you back in.
- The impersonated session never carries a "remember me" cookie, so an idle browser cannot silently re-elevate itself.

For developers
--------------

[](#for-developers)

Two events are dispatched, which other extensions can listen to:

- `FoF\Impersonate\Events\Impersonated` — when impersonation starts (`$actor`, `$user`, `$switchReason`).
- `FoF\Impersonate\Events\ImpersonationEnded` — when the impersonator returns (`$user`, `$originalUser`).

Links
-----

[](#links)

- [![OpenCollective](https://camo.githubusercontent.com/8ea53c451470d1a72789d650c77e2b22eee915f7fbf2cbeeeeaa25f47301efe2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d667269656e64736f66666c6172756d2d3434414545353f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e2d636f6c6c656374697665)](https://opencollective.com/fof/donate)
- [Flarum Discuss post](https://discuss.flarum.org/d/9868)
- [Source code on GitHub](https://github.com/FriendsOfFlarum/impersonate)
- [Report an issue](https://github.com/FriendsOfFlarum/issues)
- [Download via Packagist](https://packagist.org/packages/fof/impersonate)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance67

Regular maintenance activity

Popularity25

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~38 days

Total

21

Last Release

36d ago

Major Versions

0.8.0 → 1.0.02021-05-17

1.2.0 → 2.0.0-beta.12025-02-16

1.x-dev → 2.0.0-beta.32026-07-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/0538135c1debcef5602dce7ece027909cc832b7a6284ab9189a19aa8de98d60d?d=identicon)[clarkwinkelmann](/maintainers/clarkwinkelmann)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (19 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (16 commits)")[![clarkwinkelmann](https://avatars.githubusercontent.com/u/5264300?v=4)](https://github.com/clarkwinkelmann "clarkwinkelmann (6 commits)")[![luceos](https://avatars.githubusercontent.com/u/504687?v=4)](https://github.com/luceos "luceos (5 commits)")[![DavideIadeluca](https://avatars.githubusercontent.com/u/146922689?v=4)](https://github.com/DavideIadeluca "DavideIadeluca (5 commits)")[![karaok491](https://avatars.githubusercontent.com/u/72854852?v=4)](https://github.com/karaok491 "karaok491 (3 commits)")[![dsevillamartin](https://avatars.githubusercontent.com/u/6401250?v=4)](https://github.com/dsevillamartin "dsevillamartin (1 commits)")[![davwheat](https://avatars.githubusercontent.com/u/7406822?v=4)](https://github.com/davwheat "davwheat (1 commits)")

---

Tags

impersonateextensionloginflarum

### Embed Badge

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

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

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

13129.1k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1941.0k](/packages/flarum-lang-french)

PHPackages © 2026

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