Sets a user account status to locked. Must be run by an authenticated workspace administrator in the context of a page request.
APEX_UTIL.LOCK_ACCOUNT ( p_user_name IN VARCHAR2);
Table 28-73 LOCK_ACCOUNT Parameters
The user name of the user account.
The following example shows how to use the
LOCK_ACCOUNT procedure. Use this procedure to lock an Application Express 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;