6.6 GET_LOGIN_USERNAME_COOKIE Function

This function reads the cookie with the username from the default login page.

Syntax

GET_LOGIN_USERNAME_COOKIE (
    p_cookie_name IN VARCHAR2 DEFAULT c_default_username_cookie )
    RETURN VARCHAR2;

Parameters

Table 6-3 APEX_AUTHENTICATION.GET_LOGIN_USERNAME_COOKIE Function Parameters

Parameters Description

p_cookie_name

The cookie name which stores the username in the browser.

Example

The example code below could be from a Before Header process. It populates a text item P101_USERNAME with the cookie value and a switch P101_REMEMBER_USERNAME, based on whether the cookie already has a value.

:P101_USERNAME          := apex_authentication.get_login_username_cookie;
:P101_REMEMBER_USERNAME := case when :P101_USERNAME is not null
                           then 'Y'
                           else 'N'
                           end;