3.11 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 {the current user},
p_application_id IN NUMBER DEFAULT {the current application} )
RETURN BOOLEAN;Parameters
| Parameter | Description |
|---|---|
p_user_name |
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