Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_util019.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>EDIT_USER Procedure</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:15Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="EDIT_USER Procedure" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_util.htm" title="APEX_UTIL" type="text/html" /> <link rel="up" href="apex_util019.htm" title="EDIT_USER Procedure" type="text/html" /> <link rel="prev" href="apex_util018.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_util020.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_util.htm" title="APEX_UTIL">APEX_UTIL</a> > EDIT_USER Procedure</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_util018.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util020.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABGDGJH" name="BABGDGJH"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI117" id="AEAPI117"></a>EDIT_USER Procedure<a id="sthref106" name="sthref106"></a><a id="sthref107" name="sthref107"></a></h1> <p>This procedure enables a user account record to be altered. To execute this procedure, the current user must have administrative privileges in the workspace.</p> <a id="sthref108" name="sthref108"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_UTIL.EDIT_USER ( p_user_id IN NUMBER, p_user_name IN VARCHAR2, p_first_name IN VARCHAR2 DEFAULT NULL, p_last_name IN VARCHAR2 DEFAULT NULL, p_web_password IN VARCHAR2 DEFAULT NULL, p_new_password IN VARCHAR2 DEFAULT NULL, p_email_address IN VARCHAR2 DEFAULT NULL, p_start_date IN VARCHAR2 DEFAULT NULL, p_end_date IN VARCHAR2 DEFAULT NULL, p_employee_id IN VARCHAR2 DEFAULT NULL, p_allow_access_to_schemas IN VARCHAR2 DEFAULT NULL, p_person_type IN VARCHAR2 DEFAULT NULL, p_default_schema IN VARCHAR2 DEFAULT NULL, p_group_ids IN VARCHAR2 DEFAULT NULL, p_developer_roles IN VARCHAR2 DEFAULT NULL, p_description IN VARCHAR2 DEFAULT NULL, p_account_expiry IN DATE DEFAULT NULL, p_account_locked IN VARCHAR2 DEFAULT 'N', p_failed_access_attempts IN NUMBER DEFAULT 0, p_change_password_on_first_use IN VARCHAR2 DEFAULT 'Y', p_first_password_use_occurred IN VARCHAR2 DEFAULT 'N'); </pre> <a id="sthref109" name="sthref109"></a> <p class="subhead2">Parameters</p> <p><a href="#BABBAABA">Table: EDIT_USER Parameters</a> describes the parameters available in the <code>EDIT_USER</code> procedure.</p> <div class="tblformal"><a id="sthref110" name="sthref110"></a><a id="BABBAABA" name="BABBAABA"></a> <p class="titleintable">EDIT_USER Parameters</p> <table class="Formal" title="EDIT_USER Parameters" summary="This table describes the parameters available in EDIT_USER procedure." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="40%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t27">Parameter</th> <th align="left" valign="bottom" id="r1c2-t27">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t27" headers="r1c1-t27"> <p><code>p_user_id</code></p> </td> <td align="left" headers="r2c1-t27 r1c2-t27"> <p>Numeric primary key of the user account</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t27" headers="r1c1-t27"> <p><code>p_user_name</code></p> </td> <td align="left" headers="r3c1-t27 r1c2-t27"> <p>Alphanumeric name used for login.</p> <p><span class="bold">See Also</span>: <a href="apex_util082.htm#BABIBIBH">"SET_USERNAME Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t27" headers="r1c1-t27"> <p><code>p_first_name</code></p> </td> <td align="left" headers="r4c1-t27 r1c2-t27"> <p>Informational.</p> <p><span class="bold">See Also</span>: <a href="apex_util076.htm#BABEFBED">"SET_FIRST_NAME Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t27" headers="r1c1-t27"> <p><code>p_last_name</code></p> </td> <td align="left" headers="r5c1-t27 r1c2-t27"> <p>Informational.</p> <p><span class="bold">See Also</span>: <a href="apex_util077.htm#BABIGGEF">"SET_LAST_NAME Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t27" headers="r1c1-t27"> <p><code>p_web_password</code></p> </td> <td align="left" headers="r6c1-t27 r1c2-t27"> <p>Clear text password. If using this procedure to update the password for the user, values for both <code>p_web_password</code> and <code>p_new_password</code> must not be null and must be identical.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t27" headers="r1c1-t27"> <p><code>p_new_password</code></p> </td> <td align="left" headers="r7c1-t27 r1c2-t27"> <p>Clear text new password. If using this procedure to update the password for the user, values for both <code>p_web_password</code> and <code>p_new_password</code> must not be null and must be identical.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t27" headers="r1c1-t27"> <p><code>p_email_address</code></p> </td> <td align="left" headers="r8c1-t27 r1c2-t27"> <p>Informational.</p> <p><span class="bold">See Also</span>: <a href="apex_util075.htm#BABFCJDC">"SET_EMAIL Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t27" headers="r1c1-t27"> <p><code>p_start_date</code></p> </td> <td align="left" headers="r9c1-t27 r1c2-t27"> <p>Unused</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t27" headers="r1c1-t27"> <p><code>p_end_date</code></p> </td> <td align="left" headers="r10c1-t27 r1c2-t27"> <p>Unused</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t27" headers="r1c1-t27"> <p><code>p_employee_id</code></p> </td> <td align="left" headers="r11c1-t27 r1c2-t27"> <p>Unused</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r12c1-t27" headers="r1c1-t27"> <p><code>p_allow_access_to_schemas</code></p> </td> <td align="left" headers="r12c1-t27 r1c2-t27"> <p>A list of schemas assigned to the user's workspace to which the user is restricted</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r13c1-t27" headers="r1c1-t27"> <p><code>p_person_type</code></p> </td> <td align="left" headers="r13c1-t27 r1c2-t27"> <p>Unused</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r14c1-t27" headers="r1c1-t27"> <p><code>p_default_schema</code></p> </td> <td align="left" headers="r14c1-t27 r1c2-t27"> <p>A database schema assigned to the user's workspace, used by default for browsing</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r15c1-t27" headers="r1c1-t27"> <p><code>p_group_ids</code></p> </td> <td align="left" headers="r15c1-t27 r1c2-t27"> <p>Colon-separated list of numeric group IDs</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r16c1-t27" headers="r1c1-t27"> <p><code>p_developer_roles</code></p> </td> <td align="left" headers="r16c1-t27 r1c2-t27"> <p>Colon-separated list of developer privileges. The following are acceptable values for this parameter:</p> <p>· <span class="bold">null</span> - To update the user to be an end user (a user who can only authenticate to developed applications)</p> <p>· <span class="bold">CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</span> - To update the user to have developer privilege</p> <p><span class="bold">· ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</span> - To update the user to have full workspace administrator and developer privilege</p> <p><span class="bold">Note</span>: Currently this parameter is named inconsistently between the CREATE_USER, EDIT_USER and FETCH_USER APIs, although they all relate to the DEVELOPER_ROLE field stored in the named user account record. CREATE_USER uses p_developer_privs, EDIT_USER uses p_developer_roles and FETCH_USER uses p_developer_role.</p> <p><span class="bold">See Also</span>: <a href="apex_util052.htm#BABCHEEH">"GET_USER_ROLES Function"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r17c1-t27" headers="r1c1-t27"> <p><code>p_description</code></p> </td> <td align="left" headers="r17c1-t27 r1c2-t27"> <p>Informational</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r18c1-t27" headers="r1c1-t27"> <p><code>p_account_expiry</code></p> </td> <td align="left" headers="r18c1-t27 r1c2-t27"> <p>Date password was last updated.</p> <p><span class="bold">See Also</span>: <a href="apex_util021.htm#CHDEGHHE">"EXPIRE_END_USER_ACCOUNT Procedure"</a>, <a href="apex_util022.htm#CHDDBEEE">"EXPIRE_WORKSPACE_ACCOUNT Procedure"</a>, <a href="apex_util087.htm#CHDEDBIF">"UNEXPIRE_END_USER_ACCOUNT Procedure"</a>, <a href="apex_util088.htm#CHDFDFDH">"UNEXPIRE_WORKSPACE_ACCOUNT Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r19c1-t27" headers="r1c1-t27"> <p><code>p_account_locked</code></p> </td> <td align="left" headers="r19c1-t27 r1c2-t27"> <p>'Y' or 'N' indicating if account is locked or unlocked.</p> <p><span class="bold">See Also</span>: <a href="apex_util058.htm#CHDGCCHI">"LOCK_ACCOUNT Procedure"</a>, <a href="apex_util089.htm#CHDBFABJ">"UNLOCK_ACCOUNT Procedure"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r20c1-t27" headers="r1c1-t27"> <p><code>p_failed_access_attempts</code></p> </td> <td align="left" headers="r20c1-t27 r1c2-t27"> <p>Number of consecutive login failures that have occurred.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r21c1-t27" headers="r1c1-t27"> <p><code>p_change_password_on_first_use</code></p> </td> <td align="left" headers="r21c1-t27 r1c2-t27"> <p>'Y' or 'N' to indicate whether password must be changed on first use.</p> <p><span class="bold">See Also</span>: <a href="apex_util007.htm#CHDFJCDH">"CHANGE_PASSWORD_ON_FIRST_USE Function"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r22c1-t27" headers="r1c1-t27"> <p><code>p_first_password_use_occurred</code></p> </td> <td align="left" headers="r22c1-t27 r1c2-t27"> <p>'Y' or 'N' to indicate whether login has occurred since password change.</p> <p><span class="bold">See Also</span>: <a href="apex_util059.htm#CHDGCDII">"PASSWORD_FIRST_USE_OCCURRED Function"</a></p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref111" name="sthref111"></a> <p class="subhead2">Example</p> <p>The following example shows how to use the <code>EDIT_USER</code> procedure to update a user account. This example shows how you can use the <code>EDIT_USER</code> procedure to change the user 'FRANK' from a user with just developer privilege to a user with workspace administrator and developer privilege. Firstly, the <code>FETCH_USER</code> procedure is called to assign account details for the user 'FRANK' to local variables. These variables are then used in the call to <code>EDIT_USER</code> to preserve the details of the account, with the exception of the value for the <code>p_developer_roles</code> parameter, which is set to '<code>ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</code>'.</p> <pre xml:space="preserve" class="oac_no_warn"> DECLARE l_user_id NUMBER; l_workspace VARCHAR2(255); l_user_name VARCHAR2(100); l_first_name VARCHAR2(255); l_last_name VARCHAR2(255); l_web_password VARCHAR2(255); l_email_address VARCHAR2(240); l_start_date DATE; l_end_date DATE; l_employee_id NUMBER(15,0); l_allow_access_to_schemas VARCHAR2(4000); l_person_type VARCHAR2(1); l_default_schema VARCHAR2(30); l_groups VARCHAR2(1000); l_developer_role VARCHAR2(60); l_description VARCHAR2(240); l_account_expiry DATE; l_account_locked VARCHAR2(1); l_failed_access_attempts NUMBER; l_change_password_on_first_use VARCHAR2(1); l_first_password_use_occurred VARCHAR2(1); BEGIN l_user_id := APEX_UTIL.GET_USER_ID('FRANK'); APEX_UTIL.FETCH_USER( p_user_id => l_user_id, p_workspace => l_workspace, p_user_name => l_user_name, p_first_name => l_first_name, p_last_name => l_last_name, p_web_password => l_web_password, p_email_address => l_email_address, p_start_date => l_start_date, p_end_date => l_end_date, p_employee_id => l_employee_id, p_allow_access_to_schemas => l_allow_access_to_schemas, p_person_type => l_person_type, p_default_schema => l_default_schema, p_groups => l_groups, p_developer_role => l_developer_role, p_description => l_description, p_account_expiry => l_account_expiry, p_account_locked => l_account_locked, p_failed_access_attempts => l_failed_access_attempts, p_change_password_on_first_use => l_change_password_on_first_use, p_first_password_use_occurred => l_first_password_use_occurred); APEX_UTIL.EDIT_USER ( p_user_id => l_user_id, p_user_name => l_user_name, p_first_name => l_first_name, p_last_name => l_last_name, p_web_password => l_web_password, p_new_password => l_web_password, p_email_address => l_email_address, p_start_date => l_start_date, p_end_date => l_end_date, p_employee_id => l_employee_id, p_allow_access_to_schemas => l_allow_access_to_schemas, p_person_type => l_person_type, p_default_schema => l_default_schema, p_group_ids => l_groups, p_developer_roles => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL', p_description => l_description, p_account_expiry => l_account_expiry, p_account_locked => l_account_locked, p_failed_access_attempts => l_failed_access_attempts, p_change_password_on_first_use => l_change_password_on_first_use, p_first_password_use_occurred => l_first_password_use_occurred); END; </pre> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> <a href="apex_util027.htm#BABDAHCJ">"FETCH_USER Procedure Signature 3"</a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_util018.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util020.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de