Move authenticate to end, remove isBanned()

develop
Steve Allison 2013-02-21 14:19:50 +00:00
parent 3e52400d52
commit b91e7aa171
1 changed files with 8 additions and 19 deletions

View File

@ -206,17 +206,6 @@ class defense extends rcube_plugin {
return $content
}
/**
* Hooked function: authenticate($host, $user, $cookiecheck, $valid)
* Login attempt intercepted if IP is banned.
*
* @param var (untouched)
* @return var (untouched)
*/
public function hookAuthenticate($args) {
return $args;
}
/**
* Hooked function: login_failed($host, $user, $code)
* Log event to database
@ -282,17 +271,17 @@ class defense extends rcube_plugin {
}
/**
* Return true if logs indicate given IP is banned
*
* @param string ip
* @return bool
* Hooked function: authenticate($host, $user, $cookiecheck, $valid)
* Login attempt intercepted if IP is banned.
*
* @param var (untouched)
* @return var (untouched)
*/
public function isBanned($ip) {
$query = "SELECT count(id) FROM " . $this->db_table . " WHERE ip = ? AND ";
public function hookAuthenticate($args) {
return $args;
}
}