poll_uid
- Versions
- 4.6
poll_uid()
Determine an adjusted user id, to allow for basic tracking of anonymous users (IP-based).
Code
modules/poll.module, line 225
<?php
function poll_uid() {
global $user;
if ($user->uid) {
// Pad the UID with underscores to allow a simple strstr() search
$id = '_'. $user->uid .'_';
}
else {
$id = $_SERVER['REMOTE_ADDR'];
}
return $id;
}
?>Login or register to post comments 