Commit 15b52931 authored by Dries's avatar Dries
Browse files

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

parent 9643ec9e
......@@ -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()));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment