summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-09 08:47:30 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-09 08:47:30 +0000
commite62103b8d9463bf409881d17a4bda93f3ca3208d (patch)
treef798613fffd8e3997ac6d0befdf3cf48584e009e /core/helpers
parent930fb1f6976e60ec3774d837036b5a73bdbf32a8 (diff)
Move code to delete users and add/remove users from groups into the
model.
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/access.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php
index 8f2453df..f4e98082 100644
--- a/core/helpers/access.php
+++ b/core/helpers/access.php
@@ -200,7 +200,10 @@ class access_Core {
self::_drop_columns($name, $group->id);
}
self::_drop_columns($name, 0);
- ORM::factory("permission")->where("name", $name)->find()->delete();
+ $permission = ORM::factory("permission")->where("name", $name)->find();
+ if ($permission->loaded) {
+ $permission->delete();
+ }
}
/**