- // rolesExist - checks whether roles for team already exist.
- static function rolesExist()
- {
- $mdb2 = getConnection();
- global $user;
-
- $sql = "select count(*) as count from tt_roles where team_id = $user->team_id";
- $res = $mdb2->query($sql);
- if (!is_a($res, 'PEAR_Error')) {
- $val = $res->fetchRow();
- if ($val['count'] > 0)
- return true; // Roles for team exist.
- }
- return false;
- }
-