function authcache_commerce_form_restore_customer in Authenticated User Page Caching (Authcache) 7.2
Restore the name of the logged in user in the form customer field.
1 string reference to 'authcache_commerce_form_restore_customer'
- authcache_commerce_form_commerce_cart_add_to_cart_form_alter in modules/
authcache_commerce/ authcache_commerce.module - Implements hook_form_FORM_ID_alter().
File
- modules/
authcache_commerce/ authcache_commerce.module, line 39 - Authcache support for Drupal Commerce.
Code
function authcache_commerce_form_restore_customer($element, &$form_state) {
global $user;
$element['#value'] = $user->uid;
form_set_value($element, $element['#value'], $form_state);
}