function user_cookie_delete in Drupal 9
Same name and namespace in other branches
- 8 core/modules/user/user.module \user_cookie_delete()
- 7 modules/user/user.module \user_cookie_delete()
Delete a visitor information cookie.
Parameters
string $cookie_name: A cookie name such as 'homepage'.
File
- core/
modules/ user/ user.module, line 1150 - Enables the user registration and login system.
Code
function user_cookie_delete($cookie_name) {
setrawcookie('Drupal.visitor.' . $cookie_name, '', REQUEST_TIME - 3600, '/');
}