Floating Mask - masquerade / impersonate user
Floating Mask provides a floating action button on your Drupal site for administrators to quickly switch into any user's account for testing purposes. This module is intended for development use only and should not be used on production sites.
Floating Mask adds a floating action button (FAB) to your Drupal site that lets administrators quickly switch into any user account — without logging out or needing their password. It is ideal for testing permissions, debugging user-specific issues, and verifying what your site looks like from another user's perspective. One click to switch, one click to switch back.
Warning: This module is intended for development use only. Users can elevate permissions by design — do NOT use in a production environment.
Features
- Floating Action Button (FAB) — a fixed-position button anchored to any corner of the screen, always within reach while browsing the frontend.
- User search — search and filter users by name with built-in debounce, so you can quickly find the account you need.
- Instant session switching — click a user in the list to immediately switch into their account; the page reloads under their session.
- Switch back — your original account is tracked in the session; one click returns you to where you started.
- Re-switch while masked — switch to another user without switching back first. Your original account is preserved no matter how many times you re-switch.
- Role-based access control — configure exactly which roles are allowed to see and use the widget.
- Configurable position — place the FAB in any screen corner (bottom-left, bottom-right, top-left, top-right).
- Auto-hide — optionally hide the FAB until the cursor approaches its position, keeping the interface clean.
Post-Installation
After enabling the module (drush en floating_mask), navigate to Administration → Configuration → Development → Floating Mask (/admin/config/development/floating-mask) to configure the widget.
Once configured, users with an allowed role will see the floating button on non-admin pages. Click the button to open a searchable user panel, select a user to switch into their account, and click "Switch Back" when you are done.
Recommended modules/libraries
No additional modules are required. Floating Mask is fully self-contained and ships with its own CSS and JavaScript assets.
Similar projects
- Masquerade - the long-established user-switching module for Drupal. Masquerade integrates into the admin toolbar and provides a block/form-based interface for switching users. Floating Mask takes a different UX approach: it provides a lightweight, always-visible floating button on the frontend, with a built-in searchable user list, multi-switch, and auto-hide support. No annoying block-placing - install & use right away; uninstall & everything is cleaned up.