use wcf\system\user\notification\event\ITestableUserNotificationEvent;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
-use wcf\util\MathUtil;
use wcf\util\PasswordUtil;
use wcf\util\StringUtil;
'email' => $username . '@example.com',
'languageID' => $languages[array_rand($languages)]->languageID,
'password' => PasswordUtil::getRandomPassword(),
- 'registrationDate' => TIME_NOW - 24 * 3600 * MathUtil::getRandomValue(10, 1000),
+ 'registrationDate' => TIME_NOW - 24 * 3600 * random_int(10, 1000),
'username' => $username
]
]))->executeAction()['returnValues'];
* @return integer
*/
public static function getActivationCode($length = 9) {
- return MathUtil::getRandomValue(pow(10, $length - 1), pow(10, $length) - 1);
+ return random_int(pow(10, $length - 1), pow(10, $length) - 1);
}
/**