PHPackages                             nstcactus/craft-bas-les-masques - 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. nstcactus/craft-bas-les-masques

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

nstcactus/craft-bas-les-masques
===============================

Helps you detect if a user is being impersonated and get the originally signed in user

2.0.0(4y ago)0226MITPHP

Since Sep 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nstCactus/craft-bas-les-masques)[ Packagist](https://packagist.org/packages/nstcactus/craft-bas-les-masques)[ RSS](/packages/nstcactus-craft-bas-les-masques/feed)WikiDiscussions master Synced today

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

*Bas les masques !* plugin for Craft CMS 3.x &amp; 4.x
======================================================

[](#bas-les-masques--plugin-for-craft-cms-3x--4x)

Helps you detect if a user is being impersonated and get the originally signed-in user.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.6.0 or later (might work with earlier 3.x versions, but I didn't test it, and you'll need to tweak the composer.json).

Starting with version 2.0.0, this plugin requires Craft 4.0.0 or later.

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

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require nstcactus/craft-bas-les-masques

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for *Bas les masques !*.

Usage
-----

[](#usage)

### From the twig templates

[](#from-the-twig-templates)

#### `craft.basLesMasques.isImpersonating()`

[](#craftbaslesmasquesisimpersonating)

Return a boolean indicating if there is an ongoing impersonation.

#### `craft.basLesMasques.getOriginalUser()`

[](#craftbaslesmasquesgetoriginaluser)

Return the `User` element corresponding to the original user (the one impersonating the other), or `null` if there is no ongoing impersonation.

#### Example

[](#example)

```
    {% if craft.basLesMasques.isImpersonating() %}
        {{ craft.basLesMasques.getOriginalUser() }}
    {% endif %}
```

### From PHP code

[](#from-php-code)

#### `\nstcactus\baslesmasques\Plugin::getInstance()->service->isImpersonating()`

[](#nstcactusbaslesmasquesplugingetinstance-service-isimpersonating)

Return a boolean indicating if there is an ongoing impersonation.

#### `\nstcactus\baslesmasques\Plugin::getInstance()->service->getOriginalUser()`

[](#nstcactusbaslesmasquesplugingetinstance-service-getoriginaluser)

Return the `User` element corresponding to the original user (the one impersonating the other), or `null` if there is no ongoing impersonation.

What's with the strange name?
-----------------------------

[](#whats-with-the-strange-name)

*Bas les masques!* is french for "Drop the act!" or "Stop pretending to be someone else".

Brought to you by [nstCactus](https://github.com/nstCactus)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~281 days

Total

2

Last Release

1472d ago

Major Versions

1.0.0 → 2.0.02022-06-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/353843?v=4)[nstcactus](/maintainers/nstcactus)[@nstcactus](https://github.com/nstcactus)

---

Top Contributors

[![nstcactus](https://avatars.githubusercontent.com/u/353843?v=4)](https://github.com/nstcactus "nstcactus (6 commits)")[![nstCactus](https://avatars.githubusercontent.com/u/353843?v=4)](https://github.com/nstCactus "nstCactus (6 commits)")

---

Tags

userimpersonationimpersonatecmsUsersCraftcraftcmscraft-pluginImpersonatingbas les masquesoriginal-user

### Embed Badge

![Health badge](/badges/nstcactus-craft-bas-les-masques/health.svg)

```
[![Health](https://phpackages.com/badges/nstcactus-craft-bas-les-masques/health.svg)](https://phpackages.com/packages/nstcactus-craft-bas-les-masques)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/knock-knock

Password protect your public facing Craft website with a single password.

17124.9k9](/packages/verbb-knock-knock)[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)[verbb/autologin

Automatically login based on whitelisted IP, basic auth username or URL keys.

162.3k](/packages/verbb-autologin)

PHPackages © 2026

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