Created
June 30, 2010 16:06
-
-
Save aron/458868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: classes/model/auth/user/token.php | |
=================================================================== | |
--- classes/model/auth/user/token.php (revision 41) | |
+++ classes/model/auth/user/token.php (working copy) | |
@@ -23,14 +23,17 @@ | |
)), | |
'expires' => new Field_Timestamp, | |
)); | |
- | |
+ } | |
+ | |
+ public function __construct($values = array()) | |
+ { | |
+ parent::__construct($values); | |
if (mt_rand(1, 100) === 1) | |
{ | |
// Do garbage collection | |
Jelly::delete('user_token')->where('expires', '<', time())->execute(); | |
} | |
} | |
- | |
+ | |
public function create() | |
{ | |
// Set hash of the user agent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment