On user_load(), the parameters documentation reports the function accepts an array, but it doesn't report the function also accept a user ID.

CommentFileSizeAuthor
#11 872374_4.patch1.67 KBsender
#9 872374_3.patch1.66 KBsender
#8 872374_2.patch1.55 KBsender
#3 872374.patch633 bytessender
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice

That's true - and it's a Drupal 6 issue only. Thanks for the report.

This is a good project for a novice Drupal contributor...

sender’s picture

Assigned: Unassigned » sender
sender’s picture

FileSize
633 bytes

Here's a small patch.

sender’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That looks good, thanks!

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Is it still good then to name the argument $array?

jhodgdon’s picture

Well, that's a good point. I agree, we should change the argument name to something else besides $array. Perhaps $info or $attributes? That would still constitute a doc patch, as long as only the argument name is changed.

sender’s picture

Status: Needs work » Needs review
FileSize
1.55 KB

Good point indeed. Here's a new version with a search and replace on $array with $user_info. Credits for the name: jhodgdon ;)

sender’s picture

FileSize
1.66 KB

Improved with better wording and a list describing the different possibilities on how to use $user_info.

jhodgdon’s picture

Status: Needs review » Needs work

One of the documentation lines needs to be wrapped at 80 characters.

Otherwise it looks OK.

sender’s picture

Status: Needs work » Needs review
FileSize
1.67 KB

Fixed.

apaderno’s picture

+ *   Information about the user to load, consisting of one of the following:

Should not the phrase changed with a different one?

jhodgdon’s picture

What's wrong with that phrase?

I'm ready to mark #13 as RTBC, but not until I hear what kiamlaluno has to say about why that line needs changing. :)

apaderno’s picture

What I read is not a sentence. I would rather remove that line, as the following comment lines describe already what the argument is.

sender’s picture

@kiamlaluno: tried that before, but would that be valid Doxygen? If the line is needed, what do you suggest that would be a sentence in your view?

@jhodgdon: is this line really necessary? Can't find anything about it at https://drupal.org/node/1354#lists (or I might be blind).

jhodgdon’s picture

Typically we don't just put a list in without a line (ending in :) right before it, explaining what the list means. In this case, I think the line needs to explain that it's either/or. You could shorten it to "One of these alternatives:" or something like that.

apaderno’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 872374_4.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

The D6 test bot is choking on every patch. This patch is still fine.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

Automatically closed -- issue fixed for 2 weeks with no activity.