user_block_user_action() may log incomplete watchdog message
gpk - June 20, 2009 - 18:19
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | user.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
There's a bit of discussion on the Writing actions handbook page. The code presented there is actually out of sync now with http://api.drupal.org/api/function/user_block_user_action.
The problem is that $user->name will only be set if we are working with the global $user. Otherwise the watchdog message will just be Blocked user .
This affects 7.x and 6.x.

#1
Related: #330090: Check_plain shouldn't be used in watchdog-call in user_block_user_action.
#2
i am new here....!
#3
I've attached a small patch which should fix this.
#4
The last submitted patch failed testing.
#5
I'm not sure why this is failing now, the patch still runs against a freshly checked out HEAD, will investigate some more.
#6
I've recreated the patch and tested it, seems to work okay.
#7
The last submitted patch failed testing.