PHPackages                             derekashauer/support-access-manager - 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. derekashauer/support-access-manager

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

derekashauer/support-access-manager
===================================

Creates temporary WordPress admin accounts with expiration and access limits

v0.2.1(1y ago)24123MITPHPPHP &gt;=7.4

Since Feb 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/derekashauer/support-access-manager)[ Packagist](https://packagist.org/packages/derekashauer/support-access-manager)[ RSS](/packages/derekashauer-support-access-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Support Access Manager
======================

[](#support-access-manager)

Support Access Manager is a lightweight PHP class for WordPress that allows temporary admin accounts to be created with expiration and access limits. It can be easily dropped into any project or installed via Composer.

✅ Create temporary admin accounts
✅ Set expiration times (e.g., auto-delete after 24 hours)
✅ Limit number of logins per account
✅ Secure login URLs for support access
✅ Cron-based cleanup of expired accounts

[![Support Access Manager Screenshot](https://raw.githubusercontent.com/derekashauer/support-access-manager/main/screenshot.jpg)](https://raw.githubusercontent.com/derekashauer/support-access-manager/main/screenshot.jpg)

Install via Composer (Recommended)
----------------------------------

[](#install-via-composer-recommended)

To include Support Access Manager in your WordPress plugin or theme, add it as a dependency:

```
composer require derekashauer/support-access-manager
```

Then run:

```
composer update
```

### Usage

[](#usage)

Once installed be sure to include the autoload file:

```
require_once ABSPATH . 'vendor/autoload.php';
```

Manually Include the Class
--------------------------

[](#manually-include-the-class)

If you prefer not to use Composer, simply download `class-support-access-manager.php` and include it in your project:

```
require_once 'path/to/class-support-access-manager.php';
```

Usage
-----

[](#usage-1)

### Basic Usage (Single Instance)

[](#basic-usage-single-instance)

```
// Get the instance with default settings
Support_Access_Manager::instance();

// Or get the instance with custom settings
Support_Access_Manager::instance( array(
    'menu_label' => 'Support Users',
    'menu_slug'  => 'support-users',
    'textdomain' => 'my-plugin',
    'defaults'   => array(
        'duration'      => 2,
        'duration_unit' => 'days',
        'role'          => 'editor',
    ),
) );
```

### Custom Instance

[](#custom-instance)

If you need a completely separate instance with its own settings, you can extend the class:

```
class My_Custom_Support_Access extends Support_Access_Manager {
    // Override the singleton functionality
    public static function instance( $args = array() ) {
        return new self( $args );
    }

    // Make constructor public
    public function __construct( $args = array() ) {
        parent::__construct( $args );
    }
}

// Create your custom instance
$my_support = My_Custom_Support_Access::instance( array(
    'menu_slug'   => 'my-custom-support',
    'menu_label'  => 'My Custom Support',
    'parent_slug' => 'tools.php',
    'textdomain'  => 'my-plugin',
) );
```

This approach allows you to:

1. Have multiple instances with different settings
2. Override or extend functionality
3. Place the menu item in different locations
4. Use your own translations

### Menu Settings

[](#menu-settings)

- `menu_slug` (string) - The URL slug for the admin page

    - Default: 'support-access'
    - Example: 'temp-users'
- `menu_label` (string) - The text shown in the admin menu

    - Default: 'Support Access'
    - Example: 'Temporary Users'
- `parent_slug` (string) - Where to place the menu item

    - Default: 'users.php' (Users menu)
    - Common values: 'tools.php', 'options-general.php', 'settings.php'
- `textdomain` (string) - Text domain for translations

    - Default: 'support-access'
    - Example: 'my-plugin'
    - Use your plugin's textdomain to provide your own translations

### Form Defaults

[](#form-defaults)

The `defaults` array allows you to set default values for all form fields:

- `duration` (int) - Default number for duration

    - Default: 1
    - Example: 2
- `duration_unit` (string) - Default time unit

    - Default: 'weeks'
    - Options: 'hours', 'days', 'weeks', 'months'
- `timeout` (int|string) - Default link timeout in hours

    - Default: '' (empty string)
    - Example: 24 (link expires after 24 hours)
    - Set to empty string for no timeout
- `usage_limit` (int|string) - Default usage limit

    - Default: '' (empty string)
    - Example: 3 (link can be used 3 times)
    - Set to 0 or empty string for unlimited uses
- `role` (string) - Default WordPress role

    - Default: 'administrator'
    - Options: Any valid WordPress role ('editor', 'author', etc.)
- `locale` (string) - Default language

    - Default: '' (site default)
    - Example: 'es\_ES' (Spanish)
    - Use WordPress locale codes

### Example Configurations

[](#example-configurations)

#### Set custom defaults for menu label, duration, role

[](#set-custom-defaults-for-menu-label-duration-role)

```
new Support_Access_Manager( array(
    'menu_label' => 'Contractor Access',
    'defaults'   => array(
        'duration'      => 1,
        'duration_unit' => 'months',
        'role'          => 'author',
    ),
) );
```

#### Set custom defaults for login link timeout, usage limit, language

[](#set-custom-defaults-for-login-link-timeout-usage-limit-language)

```
new Support_Access_Manager( array(
    'defaults' => array(
        'timeout'       => 48,
        'usage_limit'   => 5,
        'role'          => 'editor',
        'locale'        => 'es_ES',
    ),
) );
```

#### Use custom text domain

[](#use-custom-text-domain)

```
new Support_Access_Manager( array(
    'textdomain' => 'my-plugin',
) );
```

Then in your plugin's translation files, you can include translations for all the strings used by Support Access Manager.

### Notes

[](#notes)

- All default values can be overridden when creating individual temporary users
- The menu will only be visible to users with the 'manage\_options' capability
- Temporary users are automatically deleted when they expire
- Access URLs can be configured to expire independently of the user account

---

License
-------

[](#license)

This project is licensed under the **MIT License**.

See the [LICENSE](LICENSE) file for details.

---

Contributing
------------

[](#contributing)

If you'd like to contribute, fork the repository and submit a pull request. Issues and feature requests are welcome.

---

Author
------

[](#author)

**Derek Ashauer**
[GitHub](https://github.com/derekashauer)

My Plugins: [Conversion Bridge](https://conversionbridgewp.com) | [WP Sunshine](https://www.wpsunshine.com) | [Sunshine Photo Cart](https://www.sunshinephotocart.com)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance43

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 97.6% 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

3

Last Release

451d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7576f2bf24340184910bc71f1e3f4bd29a660e37dff38d9443d90b1ac92cfa45?d=identicon)[derekashauer](/maintainers/derekashauer)

---

Top Contributors

[![derekashauer](https://avatars.githubusercontent.com/u/1054431?v=4)](https://github.com/derekashauer "derekashauer (40 commits)")[![calvinalkan](https://avatars.githubusercontent.com/u/76868662?v=4)](https://github.com/calvinalkan "calvinalkan (1 commits)")

### Embed Badge

![Health badge](/badges/derekashauer-support-access-manager/health.svg)

```
[![Health](https://phpackages.com/badges/derekashauer-support-access-manager/health.svg)](https://phpackages.com/packages/derekashauer-support-access-manager)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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