From 91c4bda1ec6640abb8b1a585e1fd1f8955d53fd1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 1 Dec 2008 08:50:00 +0000 Subject: Prototype access control model. There's much left to do, but it's a working implementation. --- modules/user/helpers/user_installer.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'modules/user/helpers/user_installer.php') diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php index 0f030d0e..58066acd 100644 --- a/modules/user/helpers/user_installer.php +++ b/modules/user/helpers/user_installer.php @@ -66,14 +66,13 @@ class user_installer { } public static function uninstall() { - // Remove all our groups so that we clean up the items table + // Delete all users and groups so that we give other modules an opportunity to clean up + foreach (ORM::factory("user")->find_all() as $user) { + user::delete($user->id); + } + foreach (ORM::factory("group")->find_all() as $group) { - try { - group::delete($group->id); - } catch (Kohana_Database_Exception $e) { - // We may get errors when we try to remove the view columns from the items table. - // Ignore those for now. - } + group::delete($group->id); } try { -- cgit v1.2.3