Oracle9iAS Portal Developer Kit

is_user_in_group function

Contained in package wwsec_api.

Call this routine to determine if a user is a member of a specified group.

This function can be used to resolve nested memberships. For example, if a user U is a member of a group A, which, in turn, is a member of group B, then user U is also considered a member of group B. This function returns TRUE, if p_person_id refers to user U and p_group_id refers to either group A or group B.

function is_user_in_group

(

p_person_id in number,

p_group_id in number

)

return boolean;

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_person_id

The unique ID of a user.

Note: Typically, p_person_id is obtained by calling wwsec_api.id (p_user_name) or wwxtx_api.get_user_id to get the ID of the current user.

Datatype: in number

p_group_id

The unique identifier of a group.

Datatype: in number

Returns:

This function returns TRUE if the user is a member of the specified group, or FALSE if not.

Exceptions:

This function raises no exceptions. It returns FALSE instead.

Example:

l_boolean boolean;

l_boolean := wwsec_api.is_user_in_group

(

p_person_id => wwsec_api.id ('USER1'),

p_group_id => wwsec_api.group_id ('GROUP1')

);

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio