PHPackages                             enigmatix/yii2-confirmation - 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. [Caching](/categories/caching)
4. /
5. enigmatix/yii2-confirmation

ActiveYii2-extension[Caching](/categories/caching)

enigmatix/yii2-confirmation
===========================

Allows the caching of a value and storing in a table to be approved at a later date

1.1.3(1y ago)0143MITPHP

Since Mar 26Pushed 1y ago2 watchersCompare

[ Source](https://github.com/enigmatix/yii2-confirmation)[ Packagist](https://packagist.org/packages/enigmatix/yii2-confirmation)[ RSS](/packages/enigmatix-yii2-confirmation/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (6)Versions (11)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/dfc9283cebecff8b6c48aa4fa52d7889ec4e5fa90ba574ef3ded2e315a840221/68747470733a2f2f706f7365722e707567782e6f72672f656e69676d617469782f796969322d636f6e6669726d6174696f6e2f762f737461626c65)](https://packagist.org/packages/enigmatix/yii2-confirmation)[![Latest Unstable Version](https://camo.githubusercontent.com/b5face88a7e2375e97c938a36412a0c9e73610677bd763bd0b7842f00d92cecc/68747470733a2f2f706f7365722e707567782e6f72672f656e69676d617469782f796969322d636f6e6669726d6174696f6e2f762f756e737461626c65)](https://packagist.org/packages/enigmatix/yii2-confirmation)[![Build Status](https://camo.githubusercontent.com/c3849353f1a58b65e16baed89679962a8e6efa30ec0d9996c20da199891cfa42/68747470733a2f2f7472617669732d63692e6f72672f656e69676d617469782f796969322d636f6e6669726d6174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/enigmatix/yii2-confirmation)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1fe907d170427ce8715dd5017aaf52836d39b152eb36c849d4a32c7a279304ed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656e69676d617469782f796969322d636f6e6669726d6174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/enigmatix/yii2-confirmation/?branch=master)[![License](https://camo.githubusercontent.com/57057f61a66b89a8e36683b67281e04af9e39e014f80cf66fc329ac7386ec5d3/68747470733a2f2f706f7365722e707567782e6f72672f656e69676d617469782f796969322d636f6e6669726d6174696f6e2f6c6963656e7365)](https://packagist.org/packages/enigmatix/yii2-confirmation)

Confirmation Behavior
=====================

[](#confirmation-behavior)

This behavior protects variable(s) in a model from being changed by sending a confirmation request via email. This is ideally used for secure information, such as email addresses connected to user accounts, where you want to ensure the user has access to the new email address before commiting the change.

Once a user attempts to change an email, the request and the object are stored, and the release token is sent either to the new email address, or if another attribute is changed, to the current email address of the user.

The functionality traverses the 'createdBy' link to the user's table. If no email is found in the model, and no email can be retrieved from the createdBy link, an exception will be thrown.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist enigmatix/yii2-confirmation "*"

```

or add

```
"enigmatix/yii2-confirmation": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed:

1. Run the migration

```
./yii migrate --migrationPath=@vendor/enigmatix/yii2-confirmation/migration

```

2. Add the behavior to the appropriate model.

```

Class User extends ActiveRecord {

...
    public function behaviors()
    {
        return [
        ...
            [
                'class'                 => ConfirmationBehavior::className(),
                'protectedAttributes'   => ['email'], //your attribute name here
              //'allow'                 => ['roleA', ['roleB']

            ],
        ];
    }
}

```

The 'allow' node is optional, and only required if you want certain roles to be excluded from generating a confirmation. Often useful for admin or other privileged users.

3. Add the controller to your frontend or app config/main.php

```
return [
...
    'controllerMap' => [
        'confirmation-requests' => 'enigmatix\confirmation\ConfirmationRequestsController'
    ],
];

```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance40

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~411 days

Recently: every ~718 days

Total

8

Last Release

506d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3024847?v=4)[Joel Small](/maintainers/enigmatix)[@enigmatix](https://github.com/enigmatix)

---

Top Contributors

[![enigmatix](https://avatars.githubusercontent.com/u/3024847?v=4)](https://github.com/enigmatix "enigmatix (26 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/enigmatix-yii2-confirmation/health.svg)

```
[![Health](https://phpackages.com/badges/enigmatix-yii2-confirmation/health.svg)](https://phpackages.com/packages/enigmatix-yii2-confirmation)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[lajax/yii2-asset-minifier

Runtime minification and combination of asset files.

1010.7k](/packages/lajax-yii2-asset-minifier)[undefinedor/yii2-cached-active-record

The cached activeRecord for the Yii2 framework

102.6k](/packages/undefinedor-yii2-cached-active-record)

PHPackages © 2026

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