PHP Class LoginAttempts

Inheritance: implements IResource
Show file Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
ClearLoginAttemptsForIp ( ) : void Resets the login counter by clearing all IP records from the failed login attempt database after a sucessful login.
DeleteOldLoginAttempts ( ) : void Delete IP records older than 12 hours from the database.
MaxLoginAttemptsExceeded ( ) : boolean Checks if failed login attempts exceeds the number of failed login attempts saved in the System Preferences.
RecordLoginAttempt ( ) : void Insert IP record to the database which has a failed login attempt.

Method Details

ClearLoginAttemptsForIp() public static method

Resets the login counter by clearing all IP records from the failed login attempt database after a sucessful login.
public static ClearLoginAttemptsForIp ( ) : void
return void

DeleteOldLoginAttempts() public static method

Delete IP records older than 12 hours from the database.
public static DeleteOldLoginAttempts ( ) : void
return void

MaxLoginAttemptsExceeded() public static method

Checks if failed login attempts exceeds the number of failed login attempts saved in the System Preferences.
public static MaxLoginAttemptsExceeded ( ) : boolean
return boolean

RecordLoginAttempt() public static method

Insert IP record to the database which has a failed login attempt.
public static RecordLoginAttempt ( ) : void
return void