Download the PHP package itstructure/yii2-users-module without Composer
On this page you can find all versions of the php package itstructure/yii2-users-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itstructure/yii2-users-module
More information about itstructure/yii2-users-module
Files in itstructure/yii2-users-module
Package yii2-users-module
Short Description Module to users manage for Yii2 Framework.
License MIT
Informations about the package yii2-users-module
Yii2 Users module
1 Introduction
Users module -- Module for the Yii2 framework, which provides user management with changing the next default profile data:
- name
- login
- password
- status
- roles (if authManager exists in application and rbacManage is true)
2 Dependencies
- php >= 7.1
- composer
- MySql >= 5.5
3 Installation
Via composer:
or in section require of composer.json file set the following:
and command , if you install yii2 project extensions first,
or command , if all yii2 project extensions are already installed.
4 Usage
4.1 Main properties
- The name of module:
- The namespace for used classes: .
- The alias to access in to module root directory: .
- There is not a layout ! It's taken from application layout main by default or how it is configured. You cat set 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
Base application config must be like in example below:
4.3 Useful module attributes
-
- set url to be redirected if you are not authorized.
-
- if true, here will be involved the following functional:
- field in ProfileValidate model to validate roles.
- field in create, update and _form template.
Roles, which are exist, will be loaded via authManager from application automatically.
-
- The roles of users who are allowed access.
-
- if true, there will be overwritten completely the next profile attributes instead of combining:
- , , in ProfileValidate model by custom values which can be set in ProfileValidateComponent.
- form fields in _form template by custom value which can be set in ProfileValidateComponent.
- GridView columns in index template by custom value which can be set in ProfileValidateComponent.
- DetailView attributes in view template by custom value which can be set in ProfileValidateComponent.
If is false, then the above listed parameters will be merged with custom values.
Example:
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
Copyright © 2018 Andrey Girnik [email protected].
Licensed under the MIT license. See LICENSE.txt for details.
All versions of yii2-users-module with dependencies
yiisoft/yii2 Version 2.*
yiisoft/yii2-bootstrap Version ^2.0
itstructure/yii2-field-widgets Version ^1.2.0