PHPackages                             itstructure/yii2-users-module - 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. [Framework](/categories/framework)
4. /
5. itstructure/yii2-users-module

AbandonedPackage[Framework](/categories/framework)

itstructure/yii2-users-module
=============================

Module to users manage for Yii2 Framework.

1.6.0(7y ago)138MITPHPPHP &gt;=7.1.0

Since Feb 8Pushed 7y agoCompare

[ Source](https://github.com/itstructure/yii2-users-module)[ Packagist](https://packagist.org/packages/itstructure/yii2-users-module)[ RSS](/packages/itstructure-yii2-users-module/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Yii2 Users module
=================

[](#yii2-users-module)

1 Introduction
--------------

[](#1-introduction)

[![Latest Stable Version](https://camo.githubusercontent.com/c3830d82054283bf563817ff72168c28115e8ca9688e373f6481b6643f557baf/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d75736572732d6d6f64756c652f762f737461626c65)](https://packagist.org/packages/itstructure/yii2-users-module)[![Latest Unstable Version](https://camo.githubusercontent.com/32554692293c822b9226091bb70a06c286a7a3a2ec15984b9cb3dac85b8e35ec/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d75736572732d6d6f64756c652f762f756e737461626c65)](https://packagist.org/packages/itstructure/yii2-users-module)[![License](https://camo.githubusercontent.com/044093a9d3f9e8cee0353c800081a6339227027ea5d15eb91bbec76532f4e406/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d75736572732d6d6f64756c652f6c6963656e7365)](https://packagist.org/packages/itstructure/yii2-users-module)[![Total Downloads](https://camo.githubusercontent.com/d39e4faf9638d5efab806f851a6f18456b8d8f6240b1e785cab160c8c3ceda2a/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d75736572732d6d6f64756c652f646f776e6c6f616473)](https://packagist.org/packages/itstructure/yii2-users-module)[![Build Status](https://camo.githubusercontent.com/a1191d5c2a4686fc1a39ac36fa7daea68066c3ceb0b0422e9a7dd4e213df7fe6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69747374727563747572652f796969322d75736572732d6d6f64756c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/itstructure/yii2-users-module/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0debcebe22be41885d80fdaab4d584966d893750f53007c113866ebb70578456/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69747374727563747572652f796969322d75736572732d6d6f64756c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/itstructure/yii2-users-module/?branch=master)

**Users module** -- Module for the Yii2 framework, which provides user management with changing the next default profile data:

- name
- login
- email
- password
- status
- roles (if authManager exists in application and rbacManage is true)

2 Dependencies
--------------

[](#2-dependencies)

- php &gt;= 7.1
- composer
- MySql &gt;= 5.5

3 Installation
--------------

[](#3-installation)

Via composer:

`composer require "itstructure/yii2-users-module": "^1.6.0"`

or in section **require** of composer.json file set the following:

```
"require": {
    "itstructure/yii2-users-module": "^1.6.0"
}

```

and command `composer install`, if you install yii2 project extensions first,

or command `composer update`, if all yii2 project extensions are already installed.

4 Usage
-------

[](#4-usage)

### 4.1 Main properties

[](#41-main-properties)

- The **name** of module: `users`
- The **namespace** for used classes: `Itstructure\UsersModule`.
- The **alias** to access in to module root directory: `@users`.
- **There is not a layout !** It's taken from application layout **main** by default **or how it is configured**. You cat set `layout` attribute in module by custom.
- **View** component is taken by default from the framework like **yii\\web\\View**. You cat set **View** component in module by custom.

### 4.2 Application config

[](#42-application-config)

Base application config must be like in example below:

```
use Itstructure\UsersModule\Module;
use Itstructure\UsersModule\controllers\ProfileController;
```

```
'modules' => [
    'users' => [
        'class' => Module::class,
        'controllerMap' => [
            'profile' => ProfileController::class,
        ],
    ],
],
```

### 4.3 Useful module attributes

[](#43-useful-module-attributes)

- `loginUrl` - set url to be redirected if you are not authorized.
- `rbacManage` - if **true**, here will be involved the following functional:

    - `roles` field in **ProfileValidate** model to validate roles.
    - `roles` field in **create**, **update** and **\_form** template.

    Roles, which are exist, will be loaded via **authManager** from application automatically.
- `accessRoles` - The roles of users who are allowed access.
- `customRewrite` - if **true**, there will be overwritten completely the next **profile** attributes instead of combining:

    - `rules`, `attributes`, `attributeLabels` in **ProfileValidate** model by custom values which can be set in **ProfileValidateComponent**.
    - form fields in **\_form** template by custom `formFields` value which can be set in **ProfileValidateComponent**.
    - GridView columns in index template by custom `indexViewColumns` value which can be set in **ProfileValidateComponent**.
    - DetailView attributes in view template by custom `detailViewAttributes` value which can be set in **ProfileValidateComponent**.

    If `customRewrite` is **false**, then the above listed parameters will be merged with custom values.

Example:

```
use Itstructure\UsersModule\Module;
use Itstructure\UsersModule\components\ProfileValidateComponent;
```

```
'modules' => [
    'users' => [
        'class' => Module::class,
        'controllerMap' => [
            'profile' => ProfileController::class,
        ],
        'accessRoles' => ['admin', 'manager'],
        'components' => [
            'profile-validate-component' => [
                'class' => ProfileValidateComponent::class,
                'rules' => [...],
                'attributes' => [...],
                'attributeLabels' => [...],
                'formFields' => [...],
                'indexViewColumns' => [...],
                'detailViewAttributes' => [...],
            ],
        ]
    ],
],
```

**Warning!**To set parameters of ProfileValidateComponent correctly, see how it's already done in the view profile templates and ProfileValidate model by default as example.

License
-------

[](#license)

Copyright © 2018 Andrey Girnik .

Licensed under the [MIT license](http://opensource.org/licenses/MIT). See LICENSE.txt for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~18 days

Recently: every ~30 days

Total

8

Last Release

2890d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31563329?v=4)[Andrey Girnik](/maintainers/itstructure)[@itstructure](https://github.com/itstructure)

---

Top Contributors

[![itstructure](https://avatars.githubusercontent.com/u/31563329?v=4)](https://github.com/itstructure "itstructure (9 commits)")

---

Tags

managemoduleusersyii2yii2moduleUsersyii 2

### Embed Badge

![Health badge](/badges/itstructure-yii2-users-module/health.svg)

```
[![Health](https://phpackages.com/badges/itstructure-yii2-users-module/health.svg)](https://phpackages.com/packages/itstructure-yii2-users-module)
```

###  Alternatives

[vova07/yii2-start

Yii2-Start it's a small Yii 2 application template for your fast project start.

26811.1k7](/packages/vova07-yii2-start)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[callmez/yii2-wechat

The wechat module for the Yii framework

3841.1k](/packages/callmez-yii2-wechat)[vova07/yii2-start-blogs-module

The blogs module for Yii2-start application.

1710.2k1](/packages/vova07-yii2-start-blogs-module)

PHPackages © 2026

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