Download the PHP package sadovnikpv/webvimark-module-user-management-bs4 without Composer
On this page you can find all versions of the php package sadovnikpv/webvimark-module-user-management-bs4. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sadovnikpv/webvimark-module-user-management-bs4
More information about sadovnikpv/webvimark-module-user-management-bs4
Files in sadovnikpv/webvimark-module-user-management-bs4
Package webvimark-module-user-management-bs4
Short Description User with improved RBAC, with bs4
License
Informations about the package webvimark-module-user-management-bs4
User management module for Yii 2
This repository is not actively maintained. If you want to add some changes, just fork it and safely use your fork.
Perks
- User management
- RBAC (roles, permissions and stuff) with web interface
- Registration, authorization, password recovery and so on
- Visit log
- Optimised (zero DB queries during usual user workflow)
- Nice widgets like GhostMenu or GhostHtml::a where elements are visible only if user has access to route where they point
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuration
1) In your config/web.php
To learn about events check:
- http://www.yiiframework.com/doc-2.0/guide-concept-events.html
- http://www.yiiframework.com/doc-2.0/guide-concept-configurations.html#configuration-format
Layout handler example in AuthHelper::layoutHandler()
To see full list of options check UserManagementModule file
2) In your config/console.php (this is needed for migrations and working with console)
3) Run migrations
4) In you base controller
Where you can go
First steps
From the menu above at first you'll se only 2 element: "Login" and "Logout" because you have no permission to visit other urls and to render menu we using GhostMenu::widget(). It's render only element that active user can visit.
Also same functionality has GhostNav::widget() and GhostHtml:a()
1) Login as superadmin/superadmin
2) Go to "Permissions" and play there
3) Go to "Roles" and play there
4) Go to "User" and play there
5) Relax
Usage
You controllers may have two properties that will make whole controller or selected action accessible to everyone
Or
Here are list of the useful helpers. For detailed explanation look in the corresponding functions.
Role, Permission and Route all have following methods
Events
Events can be handled via config file like following
List of supported events can be found in UserAuthEvent class
FAQ
Question: Do you have API docs?
Answer: Check this one http://opensource.id5.com.br/webvimark/doc/index.html (Credits to lukBarros)
Question: I want users to register and login with they e-mails! Mmmmm... And they should confirm it too!
Answer: See configuration properties $useEmailAsLogin and $emailConfirmationRequired
Question: I want to have profile for user with avatar, birthday and stuff. What should I do ?
Answer: Profiles are to project-specific, so you'll have to implement them yourself (but you can find example here - https://github.com/webvimark/user-management/wiki/Profile-and-custom-registration). Here is how to do it without modifying this module
1) Create table and model for profile, that have user_id (connect with "user" table)
2) Check AuthController::actionRegistration() how it works (you can skip this part)
3) Define your layout for registration. Check example in AuthHelper::layoutHandler(). Now use theming to change registraion.php file
4) Define your own UserManagementModule::$registrationFormClass. In this class you can do whatever you want like validating custom forms and saving profiles
5) Create your controller where user can view profiles
All versions of webvimark-module-user-management-bs4 with dependencies
ikimea/browser Version 1.12.0
webvimark/date-range-picker Version ^1.0.0
webvimark/helpers Version ^1.0.0
webvimark/grid-bulk-actions Version ^1.0.0
webvimark/grid-page-size Version ^1.0.0