Unanswered: Trying to Keep Users original Password even when fnd_usr_pkg.updateuser is run
I'm new to all Oracle DB and Oracle Apps. I'm trying to modify a stored proc that calls the fnd user update user stored proc.
As a parameter my stored proc excepts a dummy password since this is required for the call to the fnd_usr_pkg. Since I wont know each person's password so that it can be kept the same, I wanted to use the fnd_usr getreencrypted password to hold the user's existing password, then let the update run so that other attributes such as fax field can be updated. Then I wanted to use the setreencrypted password function to use the value I stored before running the update to set the users password back to where it started.
During this process though, I check to see if the unencrypted password parameter passed to the function equals a certain value, if it does then it gets their existing password and tries to set that again. If not then it accepts the value passed as a parameter and sets the users password to this.
As far as I can tell when I pass password5 as the parameter to my code it executes the first getencrypted statement and then sets the users password to password5, but never sets their password back to the users original value.
Am I barking up the wrong tree? I know there is a change password option, is there a way to call out an unencrypted version of their password, store that temporarily in the procedure and then set it back to that value after the update is run?
My code is below. Please Help.
P.S. I've tried commenting out the select statements and the check performed on db_ld still no go.
CREATE OR REPLACE PROCEDURE "APPS"."My_UPDATE_USER" ( user_name in varchar2,
owner in varchar2,
unencrypted_password in varchar2,
session_number in number default 0,
start_date in date default NULL,
end_date in date default NULL,
last_logon_date in date default NULL,
description in varchar2 default NULL,
password_date in date default NULL,
password_accesses_left in number default NULL,
password_lifespan_accesses in number default NULL,
password_lifespan_days in number default NULL,
employee_id in number default NULL,
email_address in varchar2 default NULL,
fax in varchar2 default NULL,
customer_id in number default NULL,
supplier_id in number default NULL,
user_status in varchar2 default NULL