Reputation: 1041
I'm wondering how you change user passwords in oracle apex. Currently I'm trying to use this pl/sql code in a process when the user exists and the reset password field is filled in.
if APEX_UTIL.GET_USERNAME(p_userid => :P5_ID) IS NOT NULL AND :P5_WACHTWOORD IS NOT NULL
then
apex_util.edit_user(
p_user_id => &P5_ID.,
p_new_password => '&P5_WACHTWOORD.'
);
end if;
But apex keeps giving me this error: PLS-00306: wrong number or types of arguments in call to 'EDIT_USER'.
I tried adding the old password in the p_web_password
param incase apex needed this. I still got the same error.
Just incase I'm doing it completely wrong. I just started using apex and I'm trying to use the default authentication, but I also want to store more stuff about the same user in my own database.
I decided to use the userid
my database generates as the apex userid
so I can keep track which user is logged in. Is this the right way or are there better options out there?
Upvotes: 1
Views: 5541
Reputation: 5035
A cursory glance at the documentation for the API shows the p_user_name is also a mandatory input.
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,
...
http://docs.oracle.com/database/apex-5.1/AEAPI/EDIT_USER-Procedure.htm#AEAPI117
Is there any reason you aren't using bind variables for the actual parameter values?
p_user_id => :P5_ID
Upvotes: 3