diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-04 06:07:28 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-04 06:07:28 -0800 |
commit | b218aee94e581230e1efa14d4ae1a19756986ddf (patch) | |
tree | a832ddf3b4322b520fd20c4d8ea2d31720c3679b /classes/User.php | |
parent | 358556057a87c0cb9291223a2026782e6548ff2e (diff) | |
parent | 14d7f4a598d0e24467fe3eafd9a02b0e651edad8 (diff) |
Merge commit 'origin/testing' into 0.9.x
Conflicts:
lib/action.php
lib/adminpanelaction.php
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/classes/User.php b/classes/User.php index 357c1e501..fade0f35d 100644 --- a/classes/User.php +++ b/classes/User.php @@ -613,28 +613,8 @@ class User extends Memcached_DataObject function getGroups($offset=0, $limit=null) { - $qry = - 'SELECT user_group.* ' . - 'FROM user_group JOIN group_member '. - 'ON user_group.id = group_member.group_id ' . - 'WHERE group_member.profile_id = %d ' . - 'ORDER BY group_member.created DESC '; - - if ($offset>0 && !is_null($limit)) { - if ($offset) { - if (common_config('db','type') == 'pgsql') { - $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; - } else { - $qry .= ' LIMIT ' . $offset . ', ' . $limit; - } - } - } - - $groups = new User_group(); - - $cnt = $groups->query(sprintf($qry, $this->id)); - - return $groups; + $profile = $this->getProfile(); + return $profile->getGroups($offset, $limit); } function getSubscriptions($offset=0, $limit=null) |