PHPackages                             woutersf/uli-bundle - 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. [CLI &amp; Console](/categories/cli)
4. /
5. woutersf/uli-bundle

ActiveMautic-plugin[CLI &amp; Console](/categories/cli)

woutersf/uli-bundle
===================

Generate secure one-time login links for Mautic users via command line

v1.0.0(5mo ago)00GPL-3.0-or-laterPHPPHP ^7.4|^8.0

Since Nov 27Pushed 5mo agoCompare

[ Source](https://github.com/woutersf/mauticUliBundle)[ Packagist](https://packagist.org/packages/woutersf/uli-bundle)[ RSS](/packages/woutersf-uli-bundle/feed)WikiDiscussions main Synced 1mo ago

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

Mautic Unique Login Links (ULI) Bundle
======================================

[](#mautic-unique-login-links-uli-bundle)

This plugin provides the ability to generate secure one-time login links for Mautic users via console command.

Features
--------

[](#features)

- 🔐 **Secure One-Time Links**: Generate cryptographically secure login URLs
- ⏰ **Auto-Expiration**: Links expire after 24 hours (configurable)
- 🗑️ **Auto-Cleanup**: Used links are automatically deleted
- 📋 **Comprehensive Logging**: All login attempts logged for security auditing
- 🛡️ **Security Built-in**: Protection against replay attacks and expired tokens
- 💻 **CLI-Based**: Easy integration with automation and scripts

Usage
-----

[](#usage)

### Generate a unique login link

[](#generate-a-unique-login-link)

```
php bin/console mautic:uli {user_id}
```

Example:

```
php bin/console mautic:uli 1
```

This will generate a URL like:

```
https://yourmautic.com/s/unique_login?hash=abc123...

```

### Access the login link

[](#access-the-login-link)

Users can access the generated URL in their browser to be automatically logged in. The link:

- Expires after 24 hours
- Is automatically deleted after use
- Logs all access attempts (successful and failed)

Database Schema
---------------

[](#database-schema)

The plugin creates a table `plugin_uli_unique_logins` with the following structure:

- `id` - Primary key
- `hash` - Unique 64-character hash
- `user_id` - Foreign key to users table
- `ttl` - Time-to-live (expiration datetime)
- `date_created` - Creation timestamp

Security Features
-----------------

[](#security-features)

- Cryptographically secure random hash generation
- Automatic cleanup of expired tokens
- Comprehensive logging of all login attempts
- User account status validation
- Protection against replay attacks (one-time use)

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

[](#installation)

### Option 1: Composer (Recommended)

[](#option-1-composer-recommended)

1. Add the plugin to your Mautic installation:

    ```
    composer require mautic/uli-bundle
    ```
2. Run database migrations:

    ```
    php bin/console doctrine:migrations:migrate
    ```
3. Clear the Mautic cache:

    ```
    php bin/console cache:clear
    ```
4. Navigate to Mautic Settings → Plugins and verify installation

### Option 2: Manual Installation

[](#option-2-manual-installation)

1. Clone or download this repository into your Mautic plugins directory:

    ```
    cd /path/to/mautic/plugins
    git clone  MauticUliBundle
    ```
2. Run database migrations:

    ```
    php bin/console doctrine:migrations:migrate
    ```
3. Clear the Mautic cache:

    ```
    php bin/console cache:clear
    ```
4. Navigate to Mautic Settings → Plugins and verify installation

### Option 3: Private Repository

[](#option-3-private-repository)

If you're hosting this plugin in a private repository, add it to your `composer.json`:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/your-username/mautic-uli-bundle.git"
        }
    ],
    "require": {
        "mautic/uli-bundle": "^1.0"
    }
}
```

Then run:

```
composer update mautic/uli-bundle
php bin/console doctrine:migrations:migrate
php bin/console cache:clear
```

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

[](#configuration)

The plugin supports the following configuration parameters:

- `uli_token_lifetime` - Token lifetime in hours (default: 24)

You can configure this in your `app/config/local.php`:

```
return [
    'parameters' => [
        'uli_token_lifetime' => 48, // 48 hours
    ],
];
```

Use Cases
---------

[](#use-cases)

- **Password Recovery**: Generate secure login links for users who forgot their password
- **Customer Support**: Provide temporary access to user accounts for support purposes
- **Automation**: Integrate with scripts to provide secure access after account creation
- **Emergency Access**: Quick access for administrators without knowing passwords
- **Testing**: Generate login links for testing purposes without managing passwords

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

[](#requirements)

- Mautic 4.x or higher
- PHP 7.4 or higher
- Database with migration support

Publishing to Packagist
-----------------------

[](#publishing-to-packagist)

To make this plugin available via Composer for everyone:

1. **Push to GitHub** (or GitLab/Bitbucket):

    ```
    git init
    git add .
    git commit -m "Initial release v1.0.0"
    git tag v1.0.0
    git remote add origin https://github.com/your-username/mautic-uli-bundle.git
    git push -u origin main
    git push --tags
    ```
2. **Submit to Packagist**:

    - Go to
    - Sign in with your GitHub account
    - Click "Submit"
    - Enter your repository URL: `https://github.com/your-username/mautic-uli-bundle`
    - Packagist will automatically track new releases via your Git tags
3. **Auto-Update Hook** (Optional):

    - In your GitHub repository settings, add Packagist webhook for automatic updates
    - Settings → Webhooks → Add webhook
    - Payload URL: `https://packagist.org/api/github?username=YOUR_USERNAME`

Version Tagging
---------------

[](#version-tagging)

When releasing new versions:

```
# Update composer.json version if needed
git add .
git commit -m "Release v1.1.0"
git tag v1.1.0
git push && git push --tags
```

Packagist will automatically detect the new tag and update the package.

Author
------

[](#author)

Mautic Community / Frederik Wouters

License
-------

[](#license)

GPL-3.0-or-later

Support
-------

[](#support)

For issues, questions, or contributions, please open an issue in the repository.

Changelog
---------

[](#changelog)

### Version 1.0.0

[](#version-100)

- Initial release
- Secure one-time login link generation via CLI
- 24-hour token expiration (configurable)
- Automatic cleanup of used/expired tokens
- Comprehensive security logging
- Database migrations
- Composer support

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance70

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

170d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/42bc3b27606ef65745245b440198e05a62e85dea0ba9f62f2ff2361bfbf1b146?d=identicon)[woutersf](/maintainers/woutersf)

---

Top Contributors

[![woutersf](https://avatars.githubusercontent.com/u/592312?v=4)](https://github.com/woutersf "woutersf (1 commits)")

---

Tags

plugincliMauticPassword Recoverysecure-loginone-time-loginuliunique-login

### Embed Badge

![Health badge](/badges/woutersf-uli-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/woutersf-uli-bundle/health.svg)](https://phpackages.com/packages/woutersf-uli-bundle)
```

PHPackages © 2026

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