Oracle apps modifies user's password api__oracle

Source: Internet
Author: User
Oracle apps The API to modify user passwords
method One: Fnd_user_pkg.updateuser (recommended way)
--Change password of Test_user to oracle123 (does don't ask for reset on I logon)
BEGIN
   Fnd_user_pkg.updateuser (X_user_name                   => ' Test_user ',
x_owner => ' CUST ',
x_unencrypted_password => ' oracle123 ',
                            x_ End_date                    => fnd_user_pkg.null_date,
x_password_date => SYSDATE-10,
                            x_password_accesses_left      => 10000,
                            x_password_lifespan_accesses  => 10000,
                            x_password_lifespan_days      => 10000
                           );
   COMMIT;
End;

updateuser API Specification
--UpdateUser (public)--the Update any column is a particular user record.
If that is the user does-not exist, the exception raised with the error message.
Procedure to update a user's password for example.  ----* * * note:this version accepts the old customer_id/employee_id-the keys foreign keys to the "person".
Use Updateuserparty to update--a user with the new person_party_id key. ----Usage Example in Pl/sql--Begin Fnd_user_pkg.updateuser (' SCOTT ', ' SEED ', ' DRAGON ');
End ----Mandatory Input Arguments--X_user_name:an existing user name--x_owner: ' SEED ' or ' CUST ' (customer)--PR Ocedure UpdateUser (X_user_name in Varchar2, X_owner in Varchar2, X_unencrypt                 Ed_password in varchar2 default NULL, x_session_number in number default NULL, X_start_date In date default NULL, x_end_date in date default NULL, x_last_logon_date in date DefaulT null, x_description in varchar2 default NULL, x_password_date in date default NULL, X_ Password_accesses_left in number default NULL, x_password_lifespan_accesses in number default NULL, X_PASSWORD_LIF              Espan_days in number default NULL, X_EMPLOYEE_ID in number default NULL, x_email_address In varchar2 default NULL, x_fax in varchar2 default null, x_customer_id in Nu Mber default NULL, x_supplier_id in number default NULL, X_old_password in VARCHAR2 Defau LT null) is begin Updateuserinternal (X_user_name => x_user_name, X_owner => X_owner, X_unencrypted_pa
    ssWOrd => X_unencrypted_password, X_session_number => x_session_number, X_start_date =>, X_end_date => x_end_date, x_last_logon_date => x_last_logon_date, x_description => x_description, X_ Password_date => X_paSsword_date, X_password_accesses_left => x_password_accesses_left, x_password_lifespan_accesses => x_passwor
    D_lifespan_accesses, X_password_lifespan_days => x_password_lifespan_days, x_employee_id =>, x_employee_id, X_email_address => x_email_address, X_fax => x_fax, x_customer_id => x_customer_id, x_supplier_id => x_supplier_id, x_person_party_id => null, X_old_password => x_old_password, X_mode ' EMPLOYEE
'); End UpdateUser;


method Two: Fnd_web_sec.change_password (not recommended)
---Change test_user Password from Pl/sql
SET serveroutput on DECLARE return_value VARCHAR2   (MB);
BEGIN
Return_value: = Fnd_web_sec.change_password (' Test_user ', ' oracle123 ');
   Dbms_output.put_line (' Result ' | | return_value);   --Y Means Success Else Fail.
   COMMIT;
End;

The second approach is primarily internal and does not recommend external calls.
--This routine was for AOL INTERNAL use only!!!!!!!
--Please call the Fnd_user_pkg.changepassword wrapper to protect
-against undocumented underlying fnd.
--Changes The password of the
applications user after verifying-the
existing pasword.  Returns ' Y ' on success and ' N ' on failure.

--Fix Bug 5087728. Added Fifth argument to specify whether autonomous-transaction is needed during
. Default is TRUE to maintain
--backward compatibility
FUNCTION Change_password (p_user in VARCHAR2,
                         p_old_ PWD in VARCHAR2,
                         p_new_pwd1 in VARCHAR2,
                         p_new_pwd2 in VARCHAR2,
                         p_autonomous in BOOLEAN DEFAULT TRUE) C14/>return VARCHAR2;





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.