Skip to content

Commit d891e7a

Browse files
committed
use random int, fixes #1
1 parent 4ff45cb commit d891e7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private static function connect() {
1111

1212
private static function generateTokenCode() {
1313
$digits = 6;
14-
$code = rand(0,1000000);
14+
$code = random_int(0,1000000);
1515
$code = str_pad($code, $digits, '0', STR_PAD_LEFT);
1616
return $code;
1717
}

0 commit comments

Comments
 (0)