[Extension] yii-usercounter

Hello!

This thread is for yii-usercounter extension. When you have an issue, questions or feedback about this extension, please post it here, so we can discuss it :)

Greats,

g3ck0

its working !!!!!!!nice work

Nice to hear ;)

You might got this error "Only variables should be passed by reference"

The second parameter of bindParam is a variable reference. Since a function return cannot be referenced, it fails to strictly meet the needs of the bindParam parameter (PHP will work with you though and will only issue a warning here).

This is my solution:




$sql = 'INSERT INTO ' . $this->tableUsers . ' VALUES (:ipAddress, :time) ON DUPLICATE KEY UPDATE user_time = :time';

$command = Yii::app()->db->createCommand($sql);

$command->bindParam(':ipAddress', $hashedIpAddress, PDO::PARAM_STR);

$t = time(); //here

$command->bindParam(':time', $t, PDO::PARAM_INT);

$command->execute();



Have fun!

Thanks for your bug report! I fixed it and published version 1.2.1.

How long online time check?

Hey! Per default it’s 10 minutes. You can control that by setting the value onlineTime.