Home > APEX_UTIL > FETCH_USER Procedure...
Previous |
Next |
This procedure fetches a user account record. To execute this procedure, the current user must have administrative privileges in the workspace. Three overloaded versions of this procedure exist, each with a distinct set of allowed parameters or signatures.
Syntax for Signature 1
APEX_UTIL.FETCH_USER ( p_user_id IN NUMBER, p_workspace OUT VARCHAR2, p_user_name OUT VARCHAR2, p_first_name OUT VARCHAR2, p_last_name OUT VARCHAR2, p_web_password OUT VARCHAR2, p_email_address OUT VARCHAR2, p_start_date OUT VARCHAR2, p_end_date OUT VARCHAR2, p_employee_id OUT VARCHAR2, p_allow_access_to_schemas OUT VARCHAR2, p_person_type OUT VARCHAR2, p_default_schema OUT VARCHAR2, p_groups OUT VARCHAR2, p_developer_role OUT VARCHAR2, p_description OUT VARCHAR2 );
Parameters for Signature 1
Table: Fetch_User Parameters Signature 1 describes the parameters available in the FETCH_USER
procedure for signature 1.
Fetch_User Parameters Signature 1
Parameter | Description |
---|---|
|
Numeric primary key of the user account |
|
The name of the workspace |
|
Alphanumeric name used for login. See Also: "GET_USERNAME Function" |
|
Informational. See Also: "GET_FIRST_NAME Function" |
|
Informational. See Also: "GET_LAST_NAME Function" |
|
Obfuscated account password |
|
Email address. See Also: "GET_EMAIL Function" |
|
Unused |
|
Unused |
|
Unused |
|
A list of schemas assigned to the user's workspace to which user is restricted |
|
Unused |
|
A database schema assigned to the user's workspace, used by default for browsing. See Also: "GET_DEFAULT_SCHEMA Function" |
|
List of groups of which user is a member. See Also: "GET_GROUPS_USER_BELONGS_TO Function" and "CURRENT_USER_IN_GROUP Function" |
|
Colon-separated list of developer roles. The following are acceptable values for this parameter:
Note: Currently this parameter is named inconsistently between the See Also: "GET_USER_ROLES Function" |
|
Informational |
Example for Signature 1
The following example shows how to use the FETCH_USER
procedure with Signature 1. This procedure is passed the ID of the currently authenticated user for the only IN
parameter p_user_id
. The code then stores all the other OUT
parameter values in local variables.
DECLARE 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); BEGIN APEX_UTIL.FETCH_USER( p_user_id => APEX_UTIL.GET_CURRENT_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); END;