Download Oracle Database Application Express User's Guide

Transcript
APEX_UTIL
Table 15–16
END_USER_ACCOUNT_DAYS_LEFT Parameters
Parameter
Description
p_user_name
The user name of the user account
Example
The following example shows how to use the END_USER_ACCOUNT_DAYS_LEFT
function. Use this function to determine the number of days remaining before an
Application Express end user account in the current workspace will expire.
DECLARE
l_days_left NUMBER;
BEGIN
FOR c1 IN (SELECT user_name from wwv_flow_users) LOOP
l_days_left := APEX_UTIL.END_USER_ACCOUNT_DAYS_LEFT(p_user_name => c1.user_
name) THEN
htp.p('End User Account:'||c1.user_name||' will expire in '||l_days_left||'
days.');
END LOOP;
END;
EXPIRE_END_USER_ACCOUNT Procedure
Expires the login account for use as a workspace end user. Must be run by an
authenticated workspace administrator in a page request context.
Syntax
APEX_UTIL.EXPIRE_END_USER_ACCOUNT (
p_user_name IN VARCHAR2
);
Parameters
Table 15–18 describes the parameters available in the EXPIRE_END_USER_ACCOUNT
procedure.
Table 15–17
EXPIRE_END_USER_ACCOUNT Parameters
Parameter
Description
p_user_name
The user name of the user account
Example
The following example shows how to use the EXPIRE_END_USER_ACCOUNT
procedure. Use this procedure to expire an Application Express account (workspace
administrator, developer, or end user) in the current workspace. This action
specifically expires the account with respect to its use by end users to authenticate to
developed applications, but it may also expire the account with respect to its use by
developers or administrators to log in to a workspace.
Note that this procedure must be run by a user having administration privileges in the
current workspace.
BEGIN
FOR c1 IN (select user_name from wwv_flow_users) LOOP
APEX_UTIL.EXPIRE_END_USER_ACCOUNT(p_user_name => c1.user_name);
htp.p('End User Account:'||c1.user_name||' is now expired.');
END LOOP;
Oracle Application Express APIs 15-13