function referral_set_cookie in User Referral 5
Same name and namespace in other branches
- 6 referral.module \referral_set_cookie()
- 7 referral.module \referral_set_cookie()
2 calls to referral_set_cookie()
File
- ./
referral.module, line 272
Code
function referral_set_cookie($uid) {
$cookie = array(
'uid' => $uid,
'timestamp' => time(),
'ip' => $_SERVER['REMOTE_ADDR'],
'referer' => $_SERVER['HTTP_REFERER'],
);
setcookie(REFERRAL_COOKIE, serialize($cookie), time() + 86400, '/');
}