Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Apr 2012 at 22:57 UTC
Updated:
4 Jan 2014 at 02:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonThanks for reporting this! Actually, it doesn't look like user_is_blocked() returns a Boolean value at all, in most cases. It returns a stdClass object if the query succeeds, and FALSE (at least in MySQL) if the query fails. This is incorrectly documented in Drupal 7 and 8 also.
By the way, please read the tagging guidelines (below the Tags field when reporting/commenting on an issue), and please don't make up your own tags.
Comment #2
jhodgdonProbably a good Novice project
Comment #3
mjonesdinero commentedattached is patch that changes the documentation for the API of user_blocked
Comment #4
SumeetSingh commentedLooks good to go
Comment #5
SumeetSingh commentedMy mistake, wrong issue.
Comment #6
jhodgdonSee comment #1 above - this documentation is not accurate.
Also, it doesn't follow our documentation formatting standards:
http://drupal.org/node/1354#functions
Comment #7
SumeetSingh commentedBetter description which follows formatting standards.
Comment #8
SumeetSingh commentedFor test bot.
Comment #9
jhodgdonSumeetSingh: Thanks for the patch... A few thoughts:
a) mjonesdinero had assigned the issue to himself, and it had only been a few hours since I reviewed his patch. It would be a bit more polite in the future to ask first "Are you still working on this?" and wait for a few days, before taking over an issue that someone is already working on. Thanks!
b) The formatting in this patch is not correct. Indentation is 2 spaces extra in @param/@return. It looks like you used tabs.
c) In documentation text, we don't normally say "stdClass", and we like to use complete sentences. So instead of this for the @return:
it should probably say:
Object with property 'name' (the user name), if the user is blocked; FALSE if the user is not blocked.
Comment #10
SumeetSingh commentedMy apologies did not realize, will keep that in mind for future reference.
Comment #11
mjonesdinero commentedupdated from what jhodgdon commented
sorry for the wrong format earlier
Comment #12
jhodgdonThanks! One more fix though: Documentation needs to be wrapped into 80-character lines. See
http://drupal.org/node/1354#general
So that @return documentation needs wrapping.
Comment #13
mjonesdinero commentedhere it is, updated the patch
Comment #14
jhodgdonAlmost there... @param and @return descriptions should end with ".":
Comment #15
mjonesdinero commentedhere it is...
Comment #16
jhodgdonThanks! I'll get this committed shortly.
Comment #17
jhodgdonI committed the above patch to 8.x and 7.x. Time to backport to 6.x. :)
Comment #18
mjonesdinero commentedhere is the patch for drupal 6
Comment #19
jhodgdonThat looks correct for Drupal 6.x. Thanks!
Comment #20
star-szrRemoving novice tag since this just needs a commit now.
Comment #21
jhodgdonThanks again! Finally got this committed to 6.x.