srand() is for seeding the PRNG. You want rand() here.

This commit is contained in:
ken restivo 2015-12-03 18:21:25 -08:00
parent ca55bbdaed
commit 5217d89543

View File

@ -51,7 +51,7 @@ function invite_post(&$a) {
}
if($invonly && ($x || is_site_admin())) {
$code = autoname(8) . srand(1000,9999);
$code = autoname(8) . rand(1000,9999);
$nmessage = str_replace('$invite_code',$code,$message);
$r = q("INSERT INTO `register` (`hash`,`created`) VALUES ('%s', '%s') ",