mirror of
https://github.com/Mibew/design.git
synced 2025-01-22 18:10:33 +03:00
Add auto token generate during Thread creation
This commit is contained in:
parent
37b8fa7243
commit
9d19afcdf2
@ -213,6 +213,7 @@ Class Thread {
|
||||
if (empty($thread->id)) {
|
||||
return false;
|
||||
}
|
||||
$thread->lastToken = self::nextToken();
|
||||
return $thread;
|
||||
}
|
||||
|
||||
@ -320,6 +321,15 @@ Class Thread {
|
||||
return $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create thread token
|
||||
*
|
||||
* @return int Thread token
|
||||
*/
|
||||
protected static function nextToken() {
|
||||
return rand(99999, 99999999);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of the magic __get method
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user