Hi Wolf,
I have recently completed a project where I implemented a Self Service Password reset function, this is based on tables within oracle itself storing the user details. Please advise if these details are helcd elsewhere, if your using LDAP et
Do you have access to the DB via SQL and can you implement new forms to the app, amend exisiting?
If so you can add a new package into the DB via SQLPLUS, using a simalr code below:
CREATE OR REPLACE PACKAGE "SELF_PWDRESET_PKG"
AS
PROCEDURE change_password (p_username IN VARCHAR2,
p_old_password IN VARCHAR2,
p_new_password IN VARCHAR2);
END SELF_PWDRESET_PKG;
/
CREATE OR REPLACE PACKAGE BODY "SELF_PWDRESET_PKG"
AS
PROCEDURE change_password (p_username IN VARCHAR2,
p_old_password IN VARCHAR2,
p_new_password IN VARCHAR2) AS
v_rowid ROWID;
BEGIN
SELECT rowid
INTO v_rowid
FROM [b]Table that stores Users[/b]
WHERE username = UPPER(p_username)
AND password = [b]NOTE[/b](p_username, p_old_password)
FOR UPDATE;
UPDATE [b]Table that stores Users[/b]
SET password = [b]NOTE[/b](p_username, p_new_password)
WHERE rowid = v_rowid;
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR(-20000, 'Invalid username/password.');
END;
END SELF_PWDRESET_PKG;
/
You can then create a new page from the added process, which will have the relevant fileds created.
Add a link to the logon page to this new page, and configure the to set the USERNAME entered into the Log in field as the USERNAME in the reset password field on the reset password page, and have this field view only.
***Please note I would imagine that all users passwords in the database are hashed for security reasons, in order for the above code to work you will need to know the hash procedure within the database an enter this into the code where it says note above***