summaryrefslogtreecommitdiff
path: root/modules/user/models/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/models/user.php')
-rw-r--r--modules/user/models/user.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user/models/user.php b/modules/user/models/user.php
index 47fa7107..585f4b96 100644
--- a/modules/user/models/user.php
+++ b/modules/user/models/user.php
@@ -44,7 +44,7 @@ class User_Model_Core extends ORM implements User_Definition {
module::event("user_before_delete", $this);
parent::delete($id);
module::event("user_deleted", $old);
- unset($this->groups_cache);
+ $this->groups_cache = null;
}
/**
@@ -59,7 +59,7 @@ class User_Model_Core extends ORM implements User_Definition {
public function groups() {
if (!$this->groups_cache) {
- $this->groups_cache = $this->groups->find_all();
+ $this->groups_cache = $this->groups->find_all()->as_array();
}
return $this->groups_cache;
}
@@ -113,7 +113,7 @@ class User_Model_Core extends ORM implements User_Definition {
module::event("user_updated", $original, $this);
}
- unset($this->groups_cache);
+ $this->groups_cache = null;
return $this;
}