Ignore:
Timestamp:
Oct 22, 2005, 11:53:12 AM (19 years ago)
Author:
plg
Message:
  • bug 173 fixed: due to phpBB user identifiers management, the method to find the next user identifier has changer to MAX+1.
  • improvement: information message when new user added
  • bug fixed: language item "Username" used instead of "login".
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r879 r906  
    7777  if (count($errors) == 0)
    7878  {
     79    // what will be the inserted id ?
     80    $query = '
     81SELECT MAX('.$conf['user_fields']['id'].') + 1
     82  FROM '.USERS_TABLE.'
     83;';
     84    list($next_id) = mysql_fetch_array(pwg_query($query));
     85   
    7986    $insert =
    8087      array(
     88        $conf['user_fields']['id'] => $next_id,
    8189        $conf['user_fields']['username'] => mysql_escape_string($login),
    8290        $conf['user_fields']['password'] => $conf['pass_convert']($password),
     
    8795    mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
    8896   
    89     create_user_infos(mysql_insert_id());
    90   }
    91  
     97    create_user_infos($next_id);
     98  }
     99
    92100  return $errors;
    93101}
Note: See TracChangeset for help on using the changeset viewer.