- Patch #173225 by killes: missing ip_address(). Slightly modified by me.

6.x
Dries Buytaert 2007-09-08 08:57:26 +00:00
parent 9643ec9e70
commit 15b52931a2
1 changed files with 2 additions and 2 deletions

View File

@ -3478,6 +3478,6 @@ function user_block_user_action(&$object, $context = array()) {
* Adds an access rule that blocks the user's IP address.
*/
function user_block_ip_action() {
db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', '%s', %d)", $_SERVER['REMOTE_ADDR'], 'host', 0);
watchdog('action', 'Banned IP address %ip', array('%ip' => $_SERVER['REMOTE_ADDR']));
db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', '%s', %d)", $ip, 'host', 0);
watchdog('action', 'Banned IP address %ip', array('%ip' => ip_address()));
}