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.

#2

Avivatech - June 21, 2009 - 12:26

i am new here....!

#3

matason - July 29, 2009 - 07:07
Status:active» needs review

I've attached a small patch which should fix this.

AttachmentSizeStatusTest resultOperations
user_block_user_action.patch1.04 KBIdleFailed: Failed to install HEAD.View details | Re-test

#4

System Message - August 1, 2009 - 08:20
Status:needs review» needs work

The last submitted patch failed testing.

#5

matason - August 2, 2009 - 07:29

I'm not sure why this is failing now, the patch still runs against a freshly checked out HEAD, will investigate some more.

#6

matason - September 8, 2009 - 20:24
Status:needs work» needs review

I've recreated the patch and tested it, seems to work okay.

AttachmentSizeStatusTest resultOperations
user_497358_incomplete_watchdog_message.patch1.04 KBIdleFailed: 14698 passes, 0 fails, 1 exceptionView details | Re-test

#7

System Message - November 9, 2009 - 12:16
Status:needs review» needs work

The last submitted patch failed testing.

 
 

Drupal is a registered trademark of Dries Buytaert.