diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-04-10 22:42:32 +0200 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-04-10 22:42:32 +0200 |
commit | 62b8fd96ffbf0b5477f383d5d3e0658415efd7f9 (patch) | |
tree | 58567879d1beb02775c2de14369eacd77b55f194 /modules | |
parent | d762662597631d63db1a7b2f1263a77d2d8ea66c (diff) | |
download | brdo-62b8fd96ffbf0b5477f383d5d3e0658415efd7f9.tar.gz brdo-62b8fd96ffbf0b5477f383d5d3e0658415efd7f9.tar.bz2 |
- Patch #1032024 by grendzy: comment_form_submit() overwrites author/visitor cookie when moderating/administering comments.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 9ab70c572..f8c3a011e 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2215,7 +2215,7 @@ function comment_form_submit($form, &$form_state) { $comment = comment_form_submit_build_comment($form, $form_state); if (user_access('post comments') && (user_access('administer comments') || $node->comment == COMMENT_NODE_OPEN)) { // Save the anonymous user information to a cookie for reuse. - if (!$comment->uid) { + if (user_is_anonymous()) { user_cookie_save(array_intersect_key($form_state['values'], array_flip(array('name', 'mail', 'homepage')))); } |