Add session history

This commit is contained in:
maranqz
2019-11-14 20:55:18 +03:00
parent 8dea2d8078
commit be2b495c9e
26 changed files with 1639 additions and 4 deletions

View File

@ -0,0 +1,60 @@
How to enable session history
============================
Session history is list user sessions.
User can delete all session except current.
Configure Module and Application
--------------------------------
```php
// ...
'modules' => [
'user' => [
'class' => Da\User\Module::class,
'enableSessionHistory' => true,
]
],
// ...
'components' => [
'session' => Da\User\Service\SessionHistory\SessionHistoryDecorator::class,
]
// ...
'container' => [
'singletons' => [
Da\User\Service\SessionHistory\TerminateSessionsServiceInterface::class => Da\User\Service\SessionHistory\TerminateSessionsService::class
]
]
// ...
'controllerMap' => [
'migrate' => [
...
'migrationNamespaces' => [
'Da\User\Migration\Session',
],
],
],
```
Additionally for upping migration can use
```
./yii migrate --migrationNamespaces=Da\\User\\Migration\Session
```
Setting user screenshot:
![Settings user screenshot](./session-history/settings.png)
Admin screenshot:
![Admin screenshot](./session-history/admin.png)
© [2amigos](http://www.2amigos.us/) 2013-2019