From f3a8fa9ea8cc3e807f066c43e6ab240c204941ee Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 7 Apr 2010 16:35:03 +0000 Subject: - Patch #763444 by jpmckinney: user_cookie_save() has a weird/awkward function signature. --- modules/user/user.module | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 40c475d92..1441dc831 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -3494,17 +3494,12 @@ function user_login_destination() { * Saves visitor information as a cookie so it can be reused. * * @param $values - * An array of submitted form values with identifying information about the - * current user, typically $form_state['values'] from a submit handler. - * @param $fields - * An array of key values from $values to be saved into a cookie. - */ -function user_cookie_save(array $values, array $fields = array('name', 'mail', 'homepage')) { - foreach ($fields as $field) { - if (isset($values[$field])) { - // Set cookie for 365 days. - setrawcookie('Drupal.visitor.' . $field, rawurlencode($values[$field]), REQUEST_TIME + 31536000, '/'); - } + * An array of key/value pairs to be saved into a cookie. + */ +function user_cookie_save(array $values) { + foreach ($values as $field => $value) { + // Set cookie for 365 days. + setrawcookie('Drupal.visitor.' . $field, rawurlencode($value), REQUEST_TIME + 31536000, '/'); } } -- cgit v1.2.3