CHANGE_PASSWORD_ON_FIRST_USE Function

Enables a developer to check whether this property is enabled or disabled for an end user account. This function returns true if the account password must be changed upon first use (after successful authentication) after the password is initially set and after it is changed on the Administration Service, Edit User page. Returns false if the account does not have this property.

This function may be run in a page request context by any authenticated user.

Syntax

APEX_UTIL.CHANGE_PASSWORD_ON_FIRST_USE (
    p_user_name IN VARCHAR2
    ) RETURN BOOLEAN
    ;

Parameters

Table: CHANGE_PASSWORD_ON_FIRST_USE Parameters describes the parameters available in the CHANGE_PASSWORD_ON_FIRST_USE function.

CHANGE_PASSWORD_ON_FIRST_USE Parameters

Parameter Description

p_user_name

The user name of the user account


Example

The following example demonstrates how to use the CHANGE_PASSWORD_ON_FIRST_USE function. Use this function to check if the password of Application Express user account (workspace administrator, developer, or end user) in the current workspace must changed by the user the first time it is used.

BEGIN
  FOR c1 IN (SELECT user_name FROM wwv_flow_users) LOOP
    IF APEX_UTIL.CHANGE_PASSWORD_ON_FIRST_USE(p_user_name => c1.user_name) THEN
        htp.p('User:'||c1.user_name||' requires password to be changed the first time it is used.');
    END IF;
  END LOOP;
END;