3.6 IS_USER_CONSENT_NEEDED Function
This function returns whether a consent screen is shown to the user before interacting with the AI.
Syntax
APEX_AI.IS_USER_CONSENT_NEEDED (
p_user_name IN VARCHAR2 DEFAULT wwv_flow_security.g_user,
p_application_id IN NUMBER DEFAULT wwv_flow_security.g_flow_id )
RETURN BOOLEAN;Parameters
| Parameter | Description |
|---|---|
p_username |
The user name. Defaults to the current user. |
p_application_id |
The application ID. Defaults to the current application. |
Returns
TRUE if an AI consent message exists and if the user has not already consented. Otherwise, FALSE.
Example
The following example checks whether user consent is needed for the current user and application.
DECLARE
l_user_consent_needed boolean;
BEGIN
l_user_consent_needed := apex_ai.is_user_consent_needed;
END;Parent topic: APEX_AI