From 359e28a50f990fb205c62532f495b48454a6787c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 10 Nov 2008 16:45:06 +0000 Subject: Remove Auth module --- modules/auth/helpers/auth_installer.php | 62 --------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 modules/auth/helpers/auth_installer.php (limited to 'modules/auth/helpers') diff --git a/modules/auth/helpers/auth_installer.php b/modules/auth/helpers/auth_installer.php deleted file mode 100644 index ebd8712e..00000000 --- a/modules/auth/helpers/auth_installer.php +++ /dev/null @@ -1,62 +0,0 @@ -where("name", "auth")->find()->version; - } catch (Exception $e) { - if ($e->getCode() == E_DATABASE_ERROR) { - $base_version = 0; - } else { - Kohana::log("error", $e); - throw $e; - } - } - Kohana::log("debug", "base_version: $base_version"); - - if ($base_version == 0) { - $db->query("CREATE TABLE IF NOT EXISTS `passwords` ( - `id` int(9) NOT NULL auto_increment, - `user_id` int(9) NOT NULL, - `password` varchar(1128) NOT NULL, - `logins` int(10) unsigned NOT NULL default '0', - `last_login` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`user_id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - $user_module = ORM::factory("module")->where("name", "auth")->find(); - $user_module->name = "auth"; - $user_module->version = 1; - $user_module->save(); - - $user = ORM::factory("user")->where("name", "admin")->find(); - Auth::instance()->set_user_password($user->id, "admin"); - } - } - - public static function uninstall() { - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS `passwords`;"); - ORM::factory("module")->where("name", "auth")->find()->delete(); - } -} \ No newline at end of file -- cgit v1.2.3