generate the new user id correctly

fixes #6
This commit is contained in:
Jan Dittberner 2007-11-23 20:28:53 +00:00
parent c0c7ce59ad
commit 962d56ce4d

View file

@ -236,8 +236,10 @@ function insertUser(&$userdata) {
if (empty($uids)) {
$uid = 1;
} else {
arsort($uids);
$uid = $uids[0] + 1;
foreach ($uids as $currentuid) {
$uid = max($uid, $currentuid);
}
$uid += 1;
}
$GLOBALS['namemap'][$uid] =
array('uid' => $uid,