This discussion is archived
9 Replies Latest reply: Apr 3, 2013 3:38 AM by fac586 RSS

Change password page

942793 Newbie
Currently Being Moderated
Hi,

I have created a custom change password page and the page contains Old password, New Password and Re-enter password and Login button.
I have a custom table that contain username and password.

How and where to write code so that it will validate the Old password against the custom table and also validate and save the new password in custom table.

Thanks & Regards,
Sagarika
  • 1. Re: Change password page
    Nattu Explorer
    Currently Being Moderated
    Hi Sagaria,

    You can do it in the page validation itself. It is just like a validation for a normal page item.

    You have to have basically two validations 1) to compare the current password entered by the user with the one available in the data base and then 2)to compare the New Password and Re-Enter New Password. If you have more password rules, you have to have that many validations, eg, New Password should not be null, should not be the same as current password etc.

    Regards,

    Natarajan
  • 2. Re: Change password page
    scott.wesley Guru
    Currently Being Moderated
    Here is one of the better examples out there to help you with ideas and protocols regarding password storage and comparison
    http://djmein.blogspot.com.au/2007/07/custom-authentication-authorisation.html

    Essentially you will need a validation on your page when the user clicks "Change" which compares the hashed version of the old password entered to what is stored on the database.

    Scott
  • 3. Re: Change password page
    942793 Newbie
    Currently Being Moderated
    Now I am able to change the password.

    I wants to redirect to login page after successfully changing the password.

    I tried following options,

    1) In 'Change Password' button select Action as 'Redirect to page in this application' and page: Login page(101)

    If I use above step I can able to redirect to login page on click of 'Change Password' button but its not changing password.

    2) In 'Change Password' button select Action as 'Submit Page' then password is changing but its not redirecting.

    Please suggest me how to redirect to login page on click of 'Change Password' button.

    Thanks & Regards,
    Sagarika
  • 4. Re: Change password page
    fac586 Guru
    Currently Being Moderated
    >

    Please update your forum profile with a real handle instead of "939790".
    Now I am able to change the password.

    I wants to redirect to login page after successfully changing the password.

    I tried following options,

    1) In 'Change Password' button select Action as 'Redirect to page in this application' and page: Login page(101)

    If I use above step I can able to redirect to login page on click of 'Change Password' button but its not changing password.
    That will not work as a redirect button does not submit the page, which means that the page accept processing is not performed.
    2) In 'Change Password' button select Action as 'Submit Page' then password is changing but its not redirecting.

    Please suggest me how to redirect to login page on click of 'Change Password' button.
    It is necessary to use a button with a submit action, then use a conditional branch to navigate to the required page. Branching is a very basic APEX technique. If you are not aware of this then you are recommended to [re]take the <i>2 Day + Application Express Developer's Guide</i> tutorial before proceeding with any further development, in order to become familiar with the fundamentals of APEX development.
  • 5. Re: Change password page
    942793 Newbie
    Currently Being Moderated
    Already I tried with Branch in After processing but its not working.

    Here is the step I performed,

    Create Branch under After Processing
    Branch Point : On Submit: After Processing (After Computation, Validation, Processing)
    Branch Type: Branch to Page or URL
    Branch Target: Page in this Application
    Page: 101Login

    Please let me know where I am going wrong.

    Thanks & Regards,
    Sagarika
  • 6. Re: Change password page
    fac586 Guru
    Currently Being Moderated
    939790 wrote:
    Already I tried with Branch in After processing but its not working.
    "its not working" is not acceptable as a problem definition. Exactly what is happening? Are there error messages? Does the application branch to a different page? Is the device unresponsive? Has it exploded?
    Here is the step I performed,

    Create Branch under After Processing
    Branch Point : On Submit: After Processing (After Computation, Validation, Processing)
    Branch Type: Branch to Page or URL
    Branch Target: Page in this Application
    Page: 101Login

    Please let me know where I am going wrong.
    In the absence of any evidence as to what is actually happening I have no idea.

    Use Debug mode to determine what the application is doing.
  • 7. Re: Change password page
    Nattu Explorer
    Currently Being Moderated
    Hi,

    Do you have both After Submit Process to change the password and a branch to "Page or URL" conditionally on the button?
    Page: 101Login
    It should just be the page number 101 and not 101Login. And the page should be in the same application, otherwise you need to give the url if you redirect to a page on another application.

    Regards,

    Natarajan
  • 8. Re: Change password page
    942793 Newbie
    Currently Being Moderated
    Its not working meaning the button is not redirecting to Login page that I mentioned in the branch. There is no error message also.

    Regards,
    Sagarika
  • 9. Re: Change password page
    fac586 Guru
    Currently Being Moderated
    939790 wrote:
    Its not working meaning the button is not redirecting to Login page that I mentioned in the branch. There is no error message also.
    Use Debug mode to determine what the application is doing.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points