jouwweb / jw-persistent-user
Extension to ZfcUser that keeps users logged on over time.
Installs: 2 240
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 3
Open Issues: 7
Requires
- php: >=7.0
- zendframework/zend-http: ^2.11.2
- zf-commons/zfc-user: 3.*
Requires (Dev)
- phpunit/phpunit: 4.8.*
- squizlabs/php_codesniffer: 2.5.*
README
JwPersistentUser
safely keeps users logged on after browser sessions ends. It is an extension module for ZfcUser
.
Installation
-
The state that this application needs is stored in models implementing the
JwPersistentUser\Model\SerieTokenInterface
. By default this module is configured to use the bundledJwPersistentUser Model\SerieToken
model. One can however configure another model that implements this interface.For example:
<?php return [ 'jwpersistentuser' => [ 'serieTokenEntityClass' => 'User\Model\SerieToken' ] ];
-
Now we need to tell how to store this data. Therefore a service needs to be registered in the service manager. This service needs to implement
JwPersistentUser\Mapper\SerieTokenMapperInterface
and be registered under underJwPersistentUser\Mapper\SerieToken
in the service manager.For example:
<?php return [ 'service_manager' => [ 'JwPersistentUser\Mapper\SerieToken' => 'User\DatabaseSerieTokenMapper' ] ];
Configuration
You can tweak the setting found described in vendor/jouwweb/jw-persistent-user/config/jwpersistentuser.local.php.dist
.