icybee/module-users-logins

Record users login times and IPs

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:icanboogie-module

1.0.x-dev 2013-07-24 12:28 UTC

This package is auto-updated.

Last update: 2024-04-07 20:54:07 UTC


README

The Users logins module (users.logins) records users login times and IPs.

Event hooks

Icybee\Modules\Users\DeleteOperation::process:before

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.

Icybee\Modules\Users\LoginOperation::process

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.

Prototype methods

The following prototype methods are added to the user object (Icybee\Modules\Users\User).

get_last_login_times

Returns the last five login times for a user:

<?php

var_dump($user->last_login_times);

get_login_count

Returns the number of login for a user:

<?php

echo "Number of login for {$user->name}: {$user->login_count}";

Requirements

This module requires the CMS Icybee.

Installation

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": "*"
	}
}

Cloning the repository

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

License

This module is licensed under the New BSD License - See the LICENSE file for details.