The Users logins module (users.logins
) records users login times and IPs.
An event hook is attache to the process:before
event of Icybee\Modules\Users\DeleteOperation
instances to delete the records associate with a user, before the user is deleted.
An event hook is attached to the process
event of Icybee\Modules\Users\LoginOperation
instances
to record the time and IP of the user loggin in.
The following prototype methods are added to the user object (Icybee\Modules\Users\User
).
Returns the last five login times for a user:
<?php
var_dump($user->last_login_times);
Returns the number of login for a user:
<?php
echo "Number of login for {$user->name}: {$user->login_count}";
This module requires the CMS Icybee.
The recommended way to install this module is through composer.
Create a composer.json
file and run php composer.phar install
command to install it:
{
"minimum-stability": "dev",
"require": {
"icybee/module-users-logins": "*"
}
}
The package is available on GitHub, its repository can be cloned with the following command line:
$ git clone git://github.com/Icybee/module-users-logins.git users.logins
This module is licensed under the New BSD License - See the LICENSE file for details.