Commit 8ded634bce5245f50c755f6a5ddfff8a031be588

Authored by rob
1 parent 5efb3b90

Adds users to the db. For testing purposes only


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@732 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 17 additions and 0 deletions
userCreate.php 0 → 100644
  1 +<?php
  2 +
  3 +$filename = "c:\script.txt";
  4 +
  5 +$fp = fopen ($filename, "w");
  6 +
  7 +// write to file
  8 +for ($i = 0; $i < 1000; $i++) {
  9 + fwrite($fp, "INSERT INTO users (username, name, password, quota_max, quota_current, email, mobile, email_notification, sms_notification, ldap_dn, max_sessions, language_id) " .
  10 + "VALUES ('admin" . $i . "', 'Administrator', '21232f297a57a5a743894a0e4a801fc3', 0, 0, '', '', 1, 1, '', 10000, 1);\n");
  11 + fwrite($fp, "INSERT INTO users_groups_link (group_id, user_id) SELECT 1, ID FROM users where username = 'admin" . $i . "';\n");
  12 +}
  13 +
  14 +
  15 +fclose($fp);
  16 +
  17 +?>
... ...