Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
15b52931
Commit
15b52931
authored
Sep 08, 2007
by
Dries
Browse files
- Patch
#173225
by killes: missing ip_address(). Slightly modified by me.
parent
9643ec9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
15b52931
...
...
@@ -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
()
));
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment