Different user actions create different punctuation in watchdog messages.
User block/delete use arrows-
watchdog('user', 'Blocked user: %name %email.', array('%name' => $account->name, '%email' => '<' . $account->mail . '>'), WATCHDOG_NOTICE);
watchdog('user', 'Deleted user: %name %email.', array('%name' => $account->name, '%email' => '<' . $account->mail . '>'), WATCHDOG_NOTICE);
User creation uses parentheses -
watchdog('user', 'New user: %name %email.', array('%name' => $form_state['values']['name'], '%email' => '<' . $form_state['values']['mail'] . '>'), WATCHDOG_NOTICE, l(t('edit'), 'user/' . $account->uid . '/edit'));
Comments
Comment #1
erikwebb commentedAttached patch converts "New user" message to arrows for consistency with the majority.
Comment #2
erikwebb commentedUser creation snippet in OP was post-patch. Original -
Comment #4
erikwebb commentedFailed to run other modules tests.
Comment #5
erikwebb commentedComment #7
superspring commentedPatches what is described above - removing extra puntuation.
Comment #8
superspring commentedPatches change above for D8.
Comment #9
lyricnz commentedI like having the visual markers around the email address, so while I agree that we should be consistent, I would prefer that we put them everywhere: AccountFormController.php has three without <>, user.module has two with <> and user.pages has one of each :)
Comment #10
superspring commentedI have searched the code base for email addresses that append a name. These instances now all have %name <%email> markup. %email by itself has been left as is.
Comment #11
lyricnz commentedLooks OK to me. Consistency is good.
Comment #13
superspring commented#10: watchdog_extra_punctuation-985360-10.patch queued for re-testing.
Comment #15
superspring commentedRemoving the fix inside the tests. This seems to work now, not too sure why though...
Comment #17
superspring commentedAttempt four
Comment #19
lyricnz commentedUnnecessary change
How is this related to the change in watchdog message?
Unnecessary cleanup. Just fix the issue, make another patch for cleanup later. Ditto for the other three below.
Comment #20
superspring commentedHey @lyricnz,
I've split this into three patches which addresses your issue above. Here I will upload two for 'code tidyup' and one for the 'bug fix'.
Comment #21
lyricnz commentedThe first patch looks good (RTBC). The second, not sure I'd bother with.
Comment #22
chx commentedThe first one is good to go. As for AccountFormController it only contains an email address w/o a name so no need for arrows or parenthesis.
Comment #23
catchNot really into argument wrapping at all. Committed/pushed the first patch from #20, thanks!