From e6858d7203bd36923f6251968bede6f4b271bf84 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 25 Feb 2010 08:44:15 -0500 Subject: modify group actions so they use Local_group to look up by nickname --- actions/leavegroup.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actions/leavegroup.php') diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 9b9d83b6c..222d4c1b4 100644 --- a/actions/leavegroup.php +++ b/actions/leavegroup.php @@ -77,7 +77,14 @@ class LeavegroupAction extends Action return false; } - $this->group = User_group::staticGet('nickname', $nickname); + $local = Local_group::staticGet('nickname', $nickname); + + if (!$local) { + $this->clientError(_('No such group.'), 404); + return false; + } + + $this->group = User_group::staticGet('id', $local->group_id); if (!$this->group) { $this->clientError(_('No such group.'), 404); -- cgit v1.2.3-54-g00ecf