summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-07 16:35:03 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-07 16:35:03 +0000
commitf3a8fa9ea8cc3e807f066c43e6ab240c204941ee (patch)
tree1fde4a9b48e241ec81c08e986eae7bad5cf9d78e /modules/user/user.module
parentdde5c67ba041dc65588377808b1943fdd3b57bf6 (diff)
downloadbrdo-f3a8fa9ea8cc3e807f066c43e6ab240c204941ee.tar.gz
brdo-f3a8fa9ea8cc3e807f066c43e6ab240c204941ee.tar.bz2
- Patch #763444 by jpmckinney: user_cookie_save() has a weird/awkward function signature.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module17
1 files changed, 6 insertions, 11 deletions
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, '/');
}
}