summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-05-29 06:27:37 +0000
committerDries Buytaert <dries@buytaert.net>2007-05-29 06:27:37 +0000
commit556ef56c52bbc9b4f73d69fd79b5b8df7dc26437 (patch)
tree0809ae2f08e966d2a99e4905e663a7409ff8e5e6 /modules/comment/comment.module
parentd80ec0f421c632e6c9c53ad1319e0c00a9407588 (diff)
downloadbrdo-556ef56c52bbc9b4f73d69fd79b5b8df7dc26437.tar.gz
brdo-556ef56c52bbc9b4f73d69fd79b5b8df7dc26437.tar.bz2
- Patch #147417 by robertDouglas: only save cookie for anonymous users.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 9e6c25c8c..3f1e76ac8 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1685,9 +1685,12 @@ function comment_form_add_preview($form, $edit, &$form_state) {
}
function comment_form_validate($form, &$form_state, $form_values) {
- foreach (array('name', 'homepage', 'mail') as $field) {
- //set cookie for 365 days
- setcookie('comment_info_'. $field, $form_values[$field], time() + 31536000);
+ global $user;
+ if ($user->uid === 0) {
+ foreach (array('name', 'homepage', 'mail') as $field) {
+ //set cookie for 365 days
+ setcookie('comment_info_'. $field, $form_values[$field], time() + 31536000);
+ }
}
comment_validate($form_values);
}
@@ -2075,4 +2078,3 @@ function int2vancode($i = 0) {
function vancode2int($c = '00') {
return base_convert(substr($c, 1), 36, 10);
}
-