fix_user_id.php 510 B

123456789101112131415161718
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Temporary fix to set user.user_id to the same as user.id
  5. */
  6. if (PHP_SAPI != 'cli') {
  7. die('This script can only be executed from the command line');
  8. }
  9. require __DIR__.'/../../main/inc/conf/configuration.php';
  10. $dbh = mysql_connect(
  11. $_configuration['db_host'],
  12. $_configuration['db_user'],
  13. $_configuration['db_password']
  14. );
  15. $db = mysql_select_db($_configuration['main_database']);
  16. $sql = "UPDATE user SET user_id = id";
  17. mysql_query($sql);