48.93 LOCK_ACCOUNT Procedure

This procedure sets a user account status to locked. Must be run by an authenticated workspace administrator in the context of a page request.

Syntax

APEX_UTIL.LOCK_ACCOUNT (
     p_user_name IN VARCHAR2 ); 

Parameters

Table 48-75 LOCK_ACCOUNT Parameters

Parameter Description
p_user_name The user name of the user account.

Example

The following example locks an Oracle APEX account (workspace administrator, developer, or end user) in the current workspace. This action locks the account for use by administrators, developers, and end users.

BEGIN
    FOR c1 IN (SELECT user_name from apex_users) LOOP
        APEX_UTIL.LOCK_ACCOUNT(p_user_name => c1.user_name);
        htp.p('End User Account:'||c1.user_name||' is now locked.');    
    END LOOP;
END;