1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00
- replaced array_rand($array) with mt_rand(0, sizeof($array) - 1) as array_rand did not take my seed


git-svn-id: file:///svn/phpbb/trunk@6705 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-12-03 17:36:59 +00:00
parent 1f7224c601
commit ec80eb74aa
15 changed files with 65 additions and 15 deletions

View File

@@ -1903,12 +1903,14 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
// Generate code
$code = gen_rand_string(mt_rand(5, 8));
$confirm_id = md5(unique_id($user->ip));
$seed = hexdec(substr(unique_id(), 4, 10));
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'confirm_id' => (string) $confirm_id,
'session_id' => (string) $user->session_id,
'confirm_type' => (int) CONFIRM_LOGIN,
'code' => (string) $code)
'code' => (string) $code,
'seed' => (int) $seed)
);
$db->sql_query($sql);