Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2007 at 03:36 UTC
Updated:
15 Mar 2010 at 19:18 UTC
Document: API documentation for hook_user() at http://api.drupal.org/api/5/function/hook_user
Problem: The "load" operation of hook_user() is confusing because of the multiple uses of the word 'load' (this is confusing for myself, and for 91786, 101914, and 57288).
Solution:
Before:
After:
Comments
Comment #1
brunodboComment #2
brunodboChanged the component to reflect the new component categorization. See http://drupal.org/node/301443.
Comment #3
jhodgdonhook_user() doesn't exist in Drupal 7 (it's hook_user_load() there, since hook_user() has been broken up into pieces in Drupal 7).
So... In looking over the cited issues and this issue report, it looks like the main point of confusion is that you need to call user_load() to get a fully realized user object, and some people thought that the global $user would be fully loaded (apparently it isn't in Drupal 5 anyway). But that's not really related to hook_user(), and I don't think hook_user() needs to mention it.
The Drupal 7 hook_user_load() already has a link to user_load_multiple()...
The Drupal 6/5 hook_user() doc says "a user being loaded", but doesn't link to user_load(). I don't really see that it's confusing, and there are not multiple uses of the word "load" in that documentation.
Comment #4
jhodgdonNote that the other part of this issue about documenting $user global is here:
#57287: Document user_load must be called to get fully realized user object