summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMichael Francis <edude03@gmail.com>2011-05-28 13:28:16 -0400
committerMichael Francis <edude03@gmail.com>2011-05-28 13:28:16 -0400
commit2389d66da849798f8d4ec5f10e3b07c11da49185 (patch)
treee22556d12982395b469a23420c662662e3e064cc /extensions
downloadotakuhub-2389d66da849798f8d4ec5f10e3b07c11da49185.tar.xz
Initial Commit
Diffstat (limited to 'extensions')
-rw-r--r--extensions/adapter/empty0
-rw-r--r--extensions/command/ImportUsers.php59
-rw-r--r--extensions/command/empty0
-rw-r--r--extensions/data/source/empty0
-rw-r--r--extensions/helper/empty0
5 files changed, 59 insertions, 0 deletions
diff --git a/extensions/adapter/empty b/extensions/adapter/empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/adapter/empty
diff --git a/extensions/command/ImportUsers.php b/extensions/command/ImportUsers.php
new file mode 100644
index 0000000..032ca2d
--- /dev/null
+++ b/extensions/command/ImportUsers.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace app\extensions\command;
+
+use \MongoDate;
+use \lithium\util\Validator;
+use \app\models\User;
+
+class ImportUsers extends \lithium\console\Command {
+ public $users;
+ public $password;
+
+ public function run()
+ {
+ /*
+ var_dump($users);
+ exit();
+ if (!empty($users) && !empty($password))
+ {*/
+ $usernames = file('/Users/edude03/Desktop/unlist.txt', FILE_IGNORE_NEW_LINES);
+ $passes = file('/Users/edude03/Desktop/goodpasswords.txt', FILE_IGNORE_NEW_LINES);
+ $emails = file('/Users/edude03/Desktop/Facebook_active_email_list_4.txt', FILE_IGNORE_NEW_LINES);
+
+ for($i = 0; $i < 1340; $i++)
+ {
+ $user = User::create(null, array('exists' => false));
+ $user->username = $usernames[$i];
+ $user->password = $passes[rand(0, 202)];
+ $user->email = $emails[$i];
+
+
+ $tf = rand(0,1) == 0 ? false : true;
+ $user->confirmed = $tf;
+ $user->active = $tf;
+ $user->joinedOn = new MongoDate();
+ $user->level = "User";
+
+ if ($user->validates())
+ {
+ var_dump($user);
+ exit();
+ $user->save(null, array('validates' => false));
+ }
+ else
+ {
+ var_dump($user);
+ print_r($user->errors());
+ exit();
+ }
+
+ }
+ }
+ /*else
+ {
+ $this->out("No file was specfied");
+ exit();
+ }
+ }*/
+} \ No newline at end of file
diff --git a/extensions/command/empty b/extensions/command/empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/command/empty
diff --git a/extensions/data/source/empty b/extensions/data/source/empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/data/source/empty
diff --git a/extensions/helper/empty b/extensions/helper/empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/helper/empty