mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-29 03:04:08 -04:00
In Kohana 2.4, ORM no longer does the find_all() call for us when we
retrieve related ORMs. If we tack a find_all() on the end, it breaks the User_Definition interface so create User_Model::groups() and Groups_Model::users() as glue.
This commit is contained in:
@@ -61,6 +61,10 @@ class User_Model extends ORM implements User_Definition {
|
||||
md5($this->email), $size, $default ? "&d=" . urlencode($default) : "");
|
||||
}
|
||||
|
||||
public function groups() {
|
||||
return $this->groups->find_all();
|
||||
}
|
||||
|
||||
public function save() {
|
||||
if (!$this->loaded()) {
|
||||
$created = 1;
|
||||
|
||||
Reference in New Issue
Block a user