Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The attached patch adds a watchdog message upon the blocking of a user. I also changed the variable name in troll_block_user from $user
to $account
for clarity, and to avoid problems if global $user
is ever introduced into that function. The existing messages that are output to the screen were fixed by changing the undefined $name
variable to $account->name
.
Comment | File | Size | Author |
---|---|---|---|
#2 | watchdog-1.png | 27.7 KB | Francewhoa |
troll.watchdog.patch | 1.5 KB | jhedstrom |
Comments
Comment #1
FrancewhoaThanks jhedstrom. Subscribing. I'll test when time allowed. Then post my result here.
Comment #2
FrancewhoaConfirming that patch works. Thanks jhedstrom :)
Tested with
*Troll 6.x-1.x-dev (2009-Aug-03)
*Drupal 6.13
*admin/reports/dblog
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedCommitted.
Comment #5
MrGeek CreditAttribution: MrGeek commentedIs this included in the 6x ver. dated Jul 11 2010? I'm still not seeing any logged events.