Download the PHP package derekashauer/support-access-manager without Composer
On this page you can find all versions of the php package derekashauer/support-access-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download derekashauer/support-access-manager
More information about derekashauer/support-access-manager
Files in derekashauer/support-access-manager
Package support-access-manager
Short Description Creates temporary WordPress admin accounts with expiration and access limits
License MIT
Informations about the package 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
Install via Composer (Recommended)
To include Support Access Manager in your WordPress plugin or theme, add it as a dependency:
Then run:
Usage
Once installed be sure to include the autoload file:
Manually Include the Class
If you prefer not to use Composer, simply download class-support-access-manager.php
and include it in your project:
Usage
Basic Usage (Single Instance)
Custom Instance
If you need a completely separate instance with its own settings, you can extend the class:
This approach allows you to:
- Have multiple instances with different settings
- Override or extend functionality
- Place the menu item in different locations
- Use your own translations
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
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
Set custom defaults for menu label, duration, role
Set custom defaults for login link timeout, usage limit, language
Use custom text domain
Then in your plugin's translation files, you can include translations for all the strings used by Support Access Manager.
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
This project is licensed under the MIT License.
See the LICENSE file for details.
Contributing
If you'd like to contribute, fork the repository and submit a pull request. Issues and feature requests are welcome.
Author
Derek Ashauer
GitHub
My Plugins: Conversion Bridge | WP Sunshine | Sunshine Photo Cart