flood_unblock_services.services.inc in Flood Unblock 7
File
flood_unblock_services/flood_unblock_services.services.inc
View source
<?php
function flood_unblock_services_services_resources() {
return array(
'flood_unblock' => array(
'actions' => array(
'all' => array(
'help' => t('Clear flood for all events'),
'callback' => '_flood_unblock_services_all',
'access arguments' => array(
'access flood unblock',
),
),
'ip' => array(
'help' => t('Clear flood for the ip event'),
'callback' => '_flood_unblock_services_ip',
'access arguments' => array(
'access flood unblock',
),
),
'user' => array(
'help' => t('Clear flood for the user event'),
'callback' => '_flood_unblock_services_user',
'access arguments' => array(
'access flood unblock',
),
),
),
),
);
}
function _flood_unblock_services_all() {
flood_unblock_clear_event('failed_login_attempt_ip', NULL);
flood_unblock_clear_event('failed_login_attempt_user', NULL);
}
function _flood_unblock_services_ip() {
flood_unblock_clear_event('failed_login_attempt_ip', NULL);
}
function _flood_unblock_services_user() {
flood_unblock_clear_event('failed_login_attempt_user', NULL);
}