oks / yii2-users
Users
Requires
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2025-03-10 16:36:57 UTC
README
Users Functionality
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist oks/yii2-users "*"
or add
"oks/yii2-users": "*"
to the require section of your composer.json
file.
Configuration
Connect the module to the public (frontend) part:
module path
oks\users\modules\user\Module
and specify the path to the token confirmation controller
'confirmLink', 'unConfirmLink'
example
'modules' => [
...
'users' => [
'class' => 'oks\users\modules\user\Module',
'confirmLink' => 'http://sitename.loc/users/token/confirm?token=',
'unConfirmLink' => 'http://sitename.loc/users/token/unconfirm?token=',
],
],
Connect the module to the admin (backend) part:
module path
oks\users\modules\admin\Module
and specify the path to the token confirmation controller from frontend public part
'confirmLink', 'unConfirmLink'
example
'modules' => [
...
'users' => [
'class' => 'oks\users\modules\admin\Module',
'confirmLink' => 'http://sitename.loc/users/token/confirm?token=',
'unConfirmLink' => 'http://sitename.loc/users/token/unconfirm?token=',
],
],
After you have to connect the controllers
'controllerMap' => [
'login' => 'oks\users\modules\admin\controllers\LoginController',
'logout' => 'oks\users\modules\admin\controllers\LogoutController',
],
and you also need to configure the mail component and should be under the mailer ID
and add in main params your email
[
'email_from' => 'your@mail',
]
and you must make migration. you can find migrations from folder migrations in extension's folder