diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-09 08:47:30 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-09 08:47:30 +0000 |
commit | e62103b8d9463bf409881d17a4bda93f3ca3208d (patch) | |
tree | f798613fffd8e3997ac6d0befdf3cf48584e009e /core/helpers | |
parent | 930fb1f6976e60ec3774d837036b5a73bdbf32a8 (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.php | 5 |
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(); + } } /** |