Home > APEX_UTIL > PASSWORD_FIRST_US...
Returns true if the account's password has changed since the account was created, an Oracle Application Express administrator performs a password reset operation that results in a new password being emailed to the account holder, or a user has initiated password reset operation. This function returns false if the account's password has not been changed since either of the events just described.
This function may be run in a page request context by any authenticated user.
Syntax
APEX_UTIL.PASSWORD_FIRST_USE_OCCURRED (
p_user_name IN VARCHAR2
) RETURN BOOLEAN
;
Parameters
Table: PASSWORD_FIRST_USE_OCCURRED Parameters describes the parameters available in the PASSWORD_FIRST_USE_OCCURRED
procedure.
PASSWORD_FIRST_USE_OCCURRED Parameters
Parameter | Description |
---|---|
|
The user name of the user account |
Example
The following example shows how to use the PASSWORD_FIRST_USE_OCCURRED
function. Use this function to check if the password for an Application Express user account (workspace administrator, developer, or end user) in the current workspace has been changed by the user the first time the user logged in after the password was initially set during account creation, or was changed by one of the password reset operations described above.This is meaningful only with accounts for which the CHANGE_PASSWORD_ON_FIRST_USE
attribute is set to Yes.
BEGIN FOR c1 IN (SELECT user_name from wwv_flow_users) LOOP IF APEX_UTIL.PASSWORD_FIRST_USE_OCCURRED(p_user_name => c1.user_name) THEN htp.p('User:'||c1.user_name||' has logged in and updated the password.'); END IF; END LOOP; END;