ZfcUserLastConnectionDate is a ZF2 module providing an automatic update of user's last connection date for each connection with ZfcUser.
For more informations about ZfcUser : ZfcUser
- Zend Framework 2 (latest master)
- ZfcBase (latest master).
- ZfcUser
- PHP version >= 5.4
-
Add this project and in your composer.json:
"require": { "inovia-team/zfc-user-last-connection-date": "dev-master" }
-
Run the command:
$ php composer.phar update
In your application.config.php
file :
return array(
'modules' => array(
// ...
'ZfcUserLastConnectionDate',
),
// ...
);
Update Your Model:
By Extending ZfcUserLastConnectionDate User entity:
use ZfcUserLastConnectionDate\Entity\LastConnectionDateUser;
class User extends LastConnectionDateUser
{
}
OR if you don't want to extends it you can use the Trait :
use ZfcUserLastConnectionDate\Entity\LastConnectionTrait;
class User extends ZfcUser
{
use LastConnectionTrait;
}
Update Your database schema:
There are some SQL example in ./vendor/inovia-team/zfc-user-last-connection-date/data/
Navigate to http://yourproject/user/login.
There is nothing to configure !
ZfcLastConnectionDate is released under the MIT License.