This content has been marked as final. Show 6 replies
I'm presuming that your users are logged in when they click the change password link, if so just make your Username field a read only field and in the Source Type choose: PL/SQL Expression or Function and then enter :APP_USER in the expression field. This will then use the username of the logged in User.
Hope this helps.
Thank you for your reply and sorry if I explained wrongly,
My users or not logging in when they clicking the change password,
see the below function which I used in my Custom authentication scheme,
create or replace function "CUSTOMAUTHENTICATION"
(p_username in VARCHAR2,
p_password in VARCHAR2)
FOR c1 IN (SELECT 1
WHERE upper(username) = upper(p_username)
AND upper(password) = upper(p_password))
So during the login time if the username exist in the table login_table with the appropriate password they can login to the home_page
in the home_page only the change_password link is available and not in login page itself.
How can I get this.
Unless I'm misunderstanding to change the password it uses the following flow.
User Logs in => User is Directed to home Page after Login => User Presses Change Password Link => User is Directed to Change Password Page.
If your users are logged into the application after successfully authenticating then you will be able to follow the Steps I outlined earlier.
In the page that it directs you to after clicking the change password link make your Username field on that page is a read only field (This is not the Username field on your Login Page).
Now in the Source Type choose: PL/SQL Expression or Function and then enter :APP_USER in the expression field. This will then populate the username field on your change password page with the user that is currently authenticated for the system.
Sorry if my steps weren't clear originally.
I have some more question,
When they are typing the current_password I want to check whether they entered correct password for the username and
also have to check the New_password and Retype_password are same,
I tried by validate item but its not working fine.
I used the login_table for my login page,
which has only two fields username and password as like login screen, in my appliction in the change password page
I used the another table called Update_user
which has four fields,
and the change password page contains this exact same 4 fields from this Table,
whenever the users entering the 4 fields and if they click the create/update button the data will be stored in the Update_Table
and the password field in the Login_table will be updated based on the following trigger,
As you said I tried that :APP_USER and I made the username column as read only,
create or replace TRIGGER trg1 before insert on update_user referencing old as old new as new for each row begin update login_table set password= :new.retype where username=:new.username; end;
When the values inserted except the username other 3 values inserted into the update_user table and the login_table not updated so the password also not changed,
Is there any other way to directly upadte the password in the Login_table without going for another Table?
Please Give some suggestion.