- Patch #147417 by robertDouglas: only save cookie for anonymous users.
parent
d80ec0f421
commit
556ef56c52
|
@ -1685,9 +1685,12 @@ function comment_form_add_preview($form, $edit, &$form_state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_form_validate($form, &$form_state, $form_values) {
|
function comment_form_validate($form, &$form_state, $form_values) {
|
||||||
foreach (array('name', 'homepage', 'mail') as $field) {
|
global $user;
|
||||||
//set cookie for 365 days
|
if ($user->uid === 0) {
|
||||||
setcookie('comment_info_'. $field, $form_values[$field], time() + 31536000);
|
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);
|
comment_validate($form_values);
|
||||||
}
|
}
|
||||||
|
@ -2075,4 +2078,3 @@ function int2vancode($i = 0) {
|
||||||
function vancode2int($c = '00') {
|
function vancode2int($c = '00') {
|
||||||
return base_convert(substr($c, 1), 36, 10);
|
return base_convert(substr($c, 1), 36, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue