-- Validates a given user in a group
-- Parameters:
-- p_u_id: user id to be verified
-- p_g_id: group id
-- Returns:
-- true: if username is in group.
-- false: otherwise
function isUserInGroup(p_u_id number, p_g_id number) return boolean is
v_count number;
begin
select count(*) into v_count from cms_user_group where u_id=p_u_id and g_id=p_g_id;
if v_count>0 then
return true;
else
return false;
end if;
end isUserInGroup;
end cms_group;