Oracle9iAS Portal Developer Kit

add_portal_user function

Contained in package wwsec_api.

Call this function to create a new Oracle Portal user record and return a person ID.

In Oracle9iAS Portal 9.0.2 (or later) this function can be used to add a user profile for a user that exists in Oracle Internet Directory (OID). The user must already exist in OID before this function is called. The result of this function is that the user attributes are updated based on the values that are passed. A local entry for the user is also created in the Portal. This local entry can then be used to grant appropriate privileges to access various Portal objects.

function add_portal_user

(

p_user_name in varchar2,

p_db_user in varchar2 default null,

p_empno in varchar2 default null,

p_display_personal_info in varchar2 default 'N',

p_last_name in varchar2 default null,

p_first_name in varchar2 default null,

p_middle_name in varchar2 default null,

p_known_as in varchar2 default null,

p_maiden_name in varchar2 default null,

p_date_of_birth in varchar2 default null,

p_email in varchar2 default null,

p_work_phone in varchar2 default null,

p_home_phone in varchar2 default null,

p_mobile_phone in varchar2 default null,

p_pager in varchar2 default null,

p_fax in varchar2 default null,

p_office_addr1 in varchar2 default null,

p_office_addr2 in varchar2 default null,

p_office_addr3 in varchar2 default null,

p_office_city in varchar2 default null,

p_office_state in varchar2 default null,

p_office_zip in varchar2 default null,

p_office_country in varchar2 default null,

p_home_addr1 in varchar2 default null,

p_home_addr2 in varchar2 default null,

p_home_addr3 in varchar2 default null,

p_home_city in varchar2 default null,

p_home_state in varchar2 default null,

p_home_zip in varchar2 default null,

p_home_country in varchar2 default null,

p_organization in varchar2 default null,

p_title in varchar2 default null,

p_spending_limit in number default null,

p_hiredate in varchar2 default null,

p_source in varchar2 default null,

p_manager_user_name in varchar2 default null,

p_portal_user in varchar2 default 'Y'

)

return number;

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_user_name

The user name of the user being added to Oracle Portal.

Datatype: in varchar2

p_db_user

A database user name.

Datatype: in varchar2
Default: null

p_empno

An employee number.

Datatype: in varchar2
Default: null

p_display_personal_info

Enter Y or N to choose to display personal information.

Datatype: in varchar2
Default: 'N'

p_last_name

The user's family name.

Datatype: in varchar2
Default: null

p_first_name

The user's given name.

Datatype: in varchar2
Default: null

p_middle_name

The user's middle name.

Datatype: in varchar2
Default: null

p_known_as

The user's nickname.

Datatype: in varchar2
Default: null

p_maiden_name

The user's maiden name.

Datatype: in varchar2
Default: null

p_date_of_birth

The user's date of birth.

Note: Use the date format ‘DD-MON-YYYY’ format (the month is not case sensitive).

Datatype: in varchar2
Default: null

p_email

The user's e-mail address

Datatype: in varchar2
Default: null

p_work_phone

The user's work phone number.

Datatype: in varchar2
Default: null

p_home_phone

The user's home phone number.

Datatype: in varchar2
Default: null

p_mobile_phone

The user's mobile phone number.

Datatype: in varchar2
Default: null

p_pager

The user's pager number.

Datatype: in varchar2
Default: null

p_fax

The user's fax number.

Datatype: in varchar2
Default: null

p_office_addr1

The first line of the user's office address.

Datatype: in varchar2
Default: null

p_office_addr2

The second line of the user's office address.

Datatype: in varchar2
Default: null

p_office_addr3

The third line of the user's office address.

Datatype: in varchar2
Default: null

p_office_city

The city in which the user's office is located.

Datatype: in varchar2
Default: null

p_office_state

The state in which the user's office is located.

Datatype: in varchar2
Default: null

p_office_zip

The zip code for the person's office.

Datatype: in varchar2
Default: null

p_office_country

The country in which the user's office is located.

Datatype: in varchar2
Default: null

p_home_addr1

The first line of the user's home address.

Datatype: in varchar2
Default: null

p_home_addr2

The second line of the user's home address.

Datatype: in varchar2
Default: null

p_home_addr3

The third line of the user's home address

Datatype: in varchar2
Default: null

p_home_city

The user's home city.

Datatype: in varchar2
Default: null

p_home_state

The user's home state.

Datatype: in varchar2
Default: null

p_home_zip

The user's home zip code.

Datatype: in varchar2
Default: null

p_home_country

The user's home country.

Datatype: in varchar2
Default: null

p_organization

The user's organization.

Note: This parameter is currently ignored. The organization value is always taken from the subscriber.

Datatype: in varchar2
Default: null

p_title

The user's job title.

Datatype: in varchar2
Default: null

p_spending_limit

The user's spending limit.

Note: This parameter is currently ignored.

Datatype: in number
Default: null

p_hire_date

The user's date of hire.

Note: Use the date format ‘DD-MON-YYYY’ format (the month is not case sensitive).

Datatype: in varchar2
Default: null

p_source

The source of user information (via bulkload, or UI).

Note: This parameter is currently ignored.

Datatype: in varchar2
Default: null

p_manager_user_name

The user name of the user's manager.

Datatype: in varchar2
Default: null

p_portal_user

Indicates whether the user is an active Oracle Portal user.

Datatype: in varchar2
Default: Y

Returns:

This function returns a person ID.

Exceptions:

  • If the user's manager's user ID is not entered, a NO_MANAGER_EXCEPTION is raised.

  • If the user who initiates the calling routine has insufficient authority to execute the routine, an ACCESS_DENIED_EXCEPTION is raised.

  • If a problem occurs for which an exception has not been defined, an UNEXPECTED_EXCEPTION is raised.

  • If the user already exists, a USER_EXISTS_EXCEPTION is raised .

  • If the user is not found in OID, a USER_NOT_FOUND_EXCEPTION is raised.

Example:

l_id number;
l_id := wwsec_api.add_portal_user
(

p_User_Name => ‘JWDOE’,
p_Empno => ‘123-45-6789’,
p_Display_Personal_Info => ‘Y’,
p_Last_Name => ‘Doe’,
p_First_Name => ‘John’,
p_Middle_Name => ‘Wilson’,
p_Known_As => ‘John’,
p_Date_Of_Birth => ‘15-MAR-1968’,
p_Email => ‘jdoe@abc.com’,
p_Work_Phone => ‘(123) 456-7890’,
p_Home_Phone => ‘(234) 567-8901’,
p_Mobile_Phone => ‘(345) 678-9012’,
p_Pager => ‘(456) 789-0123’,
p_Fax => ‘(567) 890-1234’,
p_Office_Addr1 => ‘123 First St’,
p_Office_City => ‘Washington’,
p_Office_State => ‘DC’,
p_Office_Zip => ‘20001’,
p_Office_Country => ‘USA’,
p_Home_Addr1 => ‘234 Second St’,
p_Home_City => ‘Washington’,
p_Home_State => ‘DC’,
p_Home_Zip => ‘20001’,
p_Home_Country => ‘USA’,
p_Title => ‘Not Assigned’,
p_Hiredate => ‘01-Oct-2000’,
p_Manager_User_Name => ‘GHTHOMAS’,
p_Portal_User => ‘Y’

);

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio