承接 nkostadinov/yii2-user 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nkostadinov/yii2-user

最新稳定版本:0.12-beta

Composer 安装命令:

composer require nkostadinov/yii2-user

包简介

User management functionalities.

README 文档

README

Just another user module management functionalities.

  • Optional self registration via front end
  • Lost password retrieval(optional)
  • User administration interface
  • Flexible access control
  • Console commnads(TODO)
  • Advanced user (optional)

Installation

  1. Download Yii2-user using composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nkostadinov/yii2-user "*"

or add

"nkostadinov/yii2-user": "*"

to the require section of your composer.json file.

  1. Configure your application

Add following lines to your main configuration file:

'components' => [
    'user' => [
        'class' => 'nkostadinov\user\components\User',
    ],
],
'modules' => [
    'user' => [
        'class' => 'nkostadinov\user\Module',
    ],
],

Step 3: Update database schema

NOTE: Make sure that you have properly configured db application component.

After you downloaded and configured Yii2-user, the last thing you need to do is updating your database schema by applying the migrations:

$ php yii migrate/up --migrationPath=@vendor/nkostadinov/yii2-user/migrations

How to run tests

Install codeception globally:

$ composer global require "codeception/codeception=*" "codeception/specify=*" "codeception/verify=*"

Install globally the composer's asset plugin:

$ composer global require "fxp/composer-asset-plugin:~1.1.0"

Go to nkostadinov/yii2-user directory and run:

$ composer update

Build the codeception actors:

$ codecept build

Create a new database called 'user_test':

$ mysql -e 'create database user_test;'

Run the migrations:

$ php tests/_app/yii migrate --interactive=0

Advanced user

The yii2-user extension has the following additional functionalities that can be added on demand:

  • [Password aging] (docs/PASSWORD_AGING.md)
  • [Password history policy] (docs/PASSWORD_HISTORY_POLICY.md)
  • [Account locking policy] (docs/ACCOUNT_LOCKING_POLICY.md)
  • [First login policy] (docs/FIRST_LOGIN_POLICY.md)

Admin panel

You can find the admin panel on /user/admin/index route. In order to set proper permissions, change the access rules of the controller via the $adminRules property of the User component. Defaults to:

[
    [
        'allow' => true,
        'roles' => ['@']
    ]
]

统计信息

  • 总下载量: 606
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 6
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-03-22