the docs for user_save() should mention that $account is a pseudo-optional parameter, and can be either a valid $user object to work with an existing user, or an empty string to create a new user.

Files: 
CommentFileSizeAuthor
#26 user_save-372766-26-D6.patch1.65 KBjn2
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es). View
#24 372766_redo_D6.patch1.46 KBjhodgdon
#21 372766b_D6.patch1.42 KBjhodgdon
#20 372766_D6.patch1.42 KBjhodgdon
#17 372766.patch1.51 KBjhodgdon
Passed: 11567 passes, 0 fails, 0 exceptions View
#14 372766.patch1.37 KBjhodgdon
Failed: 11764 passes, 0 fails, 1 exception View
#13 372766.patch1.35 KBjhodgdon
Passed: 11567 passes, 0 fails, 0 exceptions View
#6 372766.patch1.31 KBjhodgdon
Passed: 11567 passes, 0 fails, 0 exceptions View
#2 372766-6.x.patch.diff1.06 KBjhodgdon
Failed: Failed to apply patch. View
#1 372766.patch1.28 KBjhodgdon
Failed: Failed to apply patch. View

Comments

jhodgdon’s picture

StatusFileSize
new1.28 KB
Failed: Failed to apply patch. View

Here is a patch that clarifies the doc (for 7.x)

jhodgdon’s picture

Status:Active» Needs review
StatusFileSize
new1.06 KB
Failed: Failed to apply patch. View

Here's a patch for 6.x too.

jhodgdon’s picture

I meant that second patch to have a .txt extension so it wouldn't automagically be applied. How can I change this or delete that attachment? Anyway, the doc sprint is wrapping up.

jhodgdon’s picture

Version:6.x-dev» 7.x-dev

Changing this to 7.x, since it is a 7.x issue as well.

Status:Needs review» Needs work

The last submitted patch failed testing.

jhodgdon’s picture

StatusFileSize
new1.31 KB
Passed: 11567 passes, 0 fails, 0 exceptions View

Here's a new 7.x patch that should apply now. Will port to 6.x when it passes review.

jhodgdon’s picture

Status:Needs work» Needs review

Forgot to change status

Status:Needs review» Needs work

The last submitted patch failed testing.

lilou’s picture

Status:Needs work» Needs review

Setting to previous status - testbot was broken (failed to install).

Status:Needs review» Needs work

The last submitted patch failed testing.

jhodgdon’s picture

Status:Needs work» Needs review

Setting back to Needs Review in hopes that the patch will get retested. The test bot was apparently malfunctioning (I had about 7 patches fail in that time period, all were doc, none broke the HEAD install I am pretty sure).

moshe weitzman’s picture

Status:Needs review» Needs work

Seems like the $user->is_new == TRUE bit got cut. I am fond of that part.

jhodgdon’s picture

Status:Needs work» Needs review
StatusFileSize
new1.35 KB
Passed: 11567 passes, 0 fails, 0 exceptions View

Good point. How is this patch?

jhodgdon’s picture

StatusFileSize
new1.37 KB
Failed: 11764 passes, 0 fails, 1 exception View

Actually, I think this one is better.

moshe weitzman’s picture

The wording for $account is still confusing IMO.

jhodgdon’s picture

Status:Needs review» Needs work

OK. I'll give it another try on Monday. Brain rather fried today. Suggestions welcome. :)

jhodgdon’s picture

Status:Needs work» Needs review
StatusFileSize
new1.51 KB
Passed: 11567 passes, 0 fails, 0 exceptions View

How about this version?

moshe weitzman’s picture

Status:Needs review» Reviewed & tested by the community

WFM

webchick’s picture

Version:7.x-dev» 6.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Committed to HEAD, thanks!

Needs backport to 6.x methinks. 6.x does not have that ->is_new parameter afaik, so that part should be dropped.

jhodgdon’s picture

Status:Patch (to be ported)» Needs review
StatusFileSize
new1.42 KB

Here is a patch for Drupal 6.

jhodgdon’s picture

StatusFileSize
new1.42 KB

Try this one. Typo in the first one.

jhodgdon’s picture

Status:Needs review» Reviewed & tested by the community

This basically matches the D7 doc (except the parts that don't apply), so I'm just going to set this to RTBC.

Gábor Hojtsy’s picture

Status:Reviewed & tested by the community» Needs work

I think this does not explain how can $account be omitted.

jhodgdon’s picture

Status:Needs work» Needs review
StatusFileSize
new1.46 KB

OK, how's this?

jhodgdon’s picture

bump. This patch still needs a review. I just noticed on another issue how bad the current doc is for user_save()... Can someone please review this? Thanks...

jn2’s picture

StatusFileSize
new1.65 KB
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es). View

The content of the patch looks good to me (a big improvement over what's there now). The patch was created before the git conversion, so doesn't apply. I've re-rolled it.

jhodgdon’s picture

Status:Needs review» Reviewed & tested by the community

OK, we have two +1 votes (mine and jn2) on the content of the patch -- thanks for the re-roll! Let's get this in.

Gábor Hojtsy’s picture

Status:Reviewed & tested by the community» Fixed

Thanks, committed.

Status:Fixed» Closed (fixed)

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