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)) { if (empty($uids)) {
$uid = 1; $uid = 1;
} else { } else {
arsort($uids); foreach ($uids as $currentuid) {
$uid = $uids[0] + 1; $uid = max($uid, $currentuid);
}
$uid += 1;
} }
$GLOBALS['namemap'][$uid] = $GLOBALS['namemap'][$uid] =
array('uid' => $uid, array('uid' => $uid,