- Patch #173225 by killes: missing ip_address(). Slightly modified by me.
parent
9643ec9e70
commit
15b52931a2
|
@ -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()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue