From 414b17d990a842e67fd0a8c0c65b71bead56bcd0 Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Tue, 14 Nov 2006 20:28:21 +0000
Subject: [PATCH] Fix for when a user belongs to no roles.

---
 application/models/tables/ApprovalBodyRoles.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/application/models/tables/ApprovalBodyRoles.php b/application/models/tables/ApprovalBodyRoles.php
index 468e7639..bc8622e3 100644
--- a/application/models/tables/ApprovalBodyRoles.php
+++ b/application/models/tables/ApprovalBodyRoles.php
@@ -39,9 +39,13 @@ class ApprovalBodyRoles extends Nmc_Db_Table
         }
 
         $db = $this->_db;
-        $where = $db->quoteInto('`group` IN(?)', $groupIds);
+        if(count($groupIds) > 0) {
+            $where = $db->quoteInto('`group` IN(?)', $groupIds);
+        } else {
+            $where = '0 = 1';
+        }
         return $this->fetchAll($where);
     }
 }
 
-?>
\ No newline at end of file
+?>
-- 
GitLab