DBPrism Servlet Engine

  -- 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;

Notes

next section Packages, context and filters

This work is licensed under a Creative Commons License . Creative Commons License
(C) 1999-2008 - DBPrism ~ DBPrism CMS | Marcelo F. Ochoa | TANDIL ~ Argentina | 2008-10-07T20:18:03
DBPrism at SourceForgeBuilt with Cocoon2