Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#26 | user_save-372766-26-D6.patch | 1.65 KB | jn2 |
#24 | 372766_redo_D6.patch | 1.46 KB | jhodgdon |
#21 | 372766b_D6.patch | 1.42 KB | jhodgdon |
#20 | 372766_D6.patch | 1.42 KB | jhodgdon |
#17 | 372766.patch | 1.51 KB | jhodgdon |
Comments
Comment #1
jhodgdonHere is a patch that clarifies the doc (for 7.x)
Comment #2
jhodgdonHere's a patch for 6.x too.
Comment #3
jhodgdonI 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.
Comment #4
jhodgdonChanging this to 7.x, since it is a 7.x issue as well.
Comment #6
jhodgdonHere's a new 7.x patch that should apply now. Will port to 6.x when it passes review.
Comment #7
jhodgdonForgot to change status
Comment #9
lilou CreditAttribution: lilou commentedSetting to previous status - testbot was broken (failed to install).
Comment #11
jhodgdonSetting 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).
Comment #12
moshe weitzman CreditAttribution: moshe weitzman commentedSeems like the $user->is_new == TRUE bit got cut. I am fond of that part.
Comment #13
jhodgdonGood point. How is this patch?
Comment #14
jhodgdonActually, I think this one is better.
Comment #15
moshe weitzman CreditAttribution: moshe weitzman commentedThe wording for $account is still confusing IMO.
Comment #16
jhodgdonOK. I'll give it another try on Monday. Brain rather fried today. Suggestions welcome. :)
Comment #17
jhodgdonHow about this version?
Comment #18
moshe weitzman CreditAttribution: moshe weitzman commentedWFM
Comment #19
webchickCommitted 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.
Comment #20
jhodgdonHere is a patch for Drupal 6.
Comment #21
jhodgdonTry this one. Typo in the first one.
Comment #22
jhodgdonThis basically matches the D7 doc (except the parts that don't apply), so I'm just going to set this to RTBC.
Comment #23
Gábor HojtsyI think this does not explain how can $account be omitted.
Comment #24
jhodgdonOK, how's this?
Comment #25
jhodgdonbump. 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...
Comment #26
jn2 CreditAttribution: jn2 commentedThe 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.
Comment #27
jhodgdonOK, we have two +1 votes (mine and jn2) on the content of the patch -- thanks for the re-roll! Let's get this in.
Comment #28
Gábor HojtsyThanks, committed.