User management module for Piko based projects.
- Optional registration
- Registration with an optional confirmation per mail
- Password recovery
- Account and profile management
- User management interface
- Permissions management (RBAC)
- Support for MYSQL ans Sqlite
1 - Install module via composer:
composer require piko/user-module2 - Edit your Piko config :
[
'components' => [
// ...
'Piko\User' => [
'identityClass' => 'Piko\UserModule\Models\User',
'checkAccess' => 'Piko\UserModule\AccessChecker::checkAccess'
],
],
'modules' => [
// ...
'user' => [
'class' => 'Piko\UserModule',
'adminRole' => 'admin',
'allowUserRegistration' => true
],
],
'bootstrap' => ['user'],
]3 - Install module tables. Create a php file at the root folder of your project (ex: install.php) and put this code :
require(__DIR__ . '/vendor/autoload.php');
(new \piko\Application(require __DIR__ . '/config.php'));
\piko\user\Module::install();
\piko\user\Module::createUser();4 - Execute install.php on the command line : php install.php and follow instructions to create the admin user.
- /user/default/login : Process login
- /user/default/logout : Process logout
- /user/default/register : Process user registration
- /user/default/edit : User account form
- /user/admin/users : Manage users, roles, permissions