yii2-module/yii2-user

A module to manage user authentication mechanisms

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:yii2-module


README

A module to manage user authentication mechanisms.

coverage build status

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar install yii2-module/yii2-user ^7

Configuration

This module needs the following components to be set at the configuration level:

  • 'db_user' should be a \yii\db\Connection

If you already have a database connection, you may use the following trick :

'db_user' => function() { return \Yii::$app->get('db'); },

where 'db' is the id of your database connection.

This module uses the following parameters to be set at the configuration level:

  • NONE

Then the module should be configured as follows (in console.php or web.php) :

$config = [
	...
	'components' => [
		...
		'user' => [
			'class' => 'yii\web\User',
			'identityClass' => 'Yii2Module\Yii2User\Components\UserIdentity',
			'enableAutoLogin' => true,
			'loginUrl' => ['user/security/signup'],
		],
		'authManager' => [
			'class' => 'Yii2Module\Yii2User\Components\RbacManager',
		],
		...
	],
	...
	'modules' => [
		...
		'user' => [
			'class' => 'Yii2Module\Yii2User\UserModule',
		],
		...
	],
	...
];

Features

This module contains the following features :

Feature NameStatus
Auto Deletion Unregistered UsersIMPLEMENTED
Email Enqueing :IMPLEMENTED
> Inscription Confirmation EmailIMPLEMENTED
> Inscription Usurpation EmailPENDING
Login FormIMPLEMENTED
Login ConfirmationIMPLEMENTED
Registration FormIMPLEMENTED
Translation ENPENDING
Translation FRPENDING
Management of Users :PENDING
> Change of user statusPENDING
> Assignment of user to groupPENDING
> Removal of user from groupPENDING
> Assignment of access to userPENDING
> Removal of access to userPENDING
> Ban of usersPENDING
> Force user to reset passwordPENDING
> > Reset pwd information emailPENDING
> View all groups having userPENDING
> View all accesses having userPENDING
Management of Groups :PENDING
> Group CreationPENDING
> Group ModificationPENDING
> > Assignment of user to groupPENDING
> > Removal of user to groupPENDING
> > Assignment access to groupPENDING
> > Removal of access to groupPENDING
> Group SuppressionPENDING
> View all users of groupPENDING
> View all accesses of groupPENDING
Management of Accesses :PENDING
> Access Creation from ModulesPENDING
> Assignment of access to usersPENDING
> > Assignment information emailPENDING
> > Removal information emailPENDING
> Assignment of access to groupsPENDING
> > Assignment information emailPENDING
> > Removal information emailPENDING
> View all groups having accessPENDING
> View all users having accessPENDING

Here is the list of modules that served as inspiration source :

https://packagist.org/explore/?query=yii2-user

License

MIT (See license file)