This discussion is archived
13 Replies Latest reply: Mar 17, 2012 2:40 AM by cardell RSS

custom change password page after password expiration

cardell Newbie
Currently Being Moderated
Hi,
I have application in APEX 4.1.
Is it possible to change default "change password" page after expiration of old password?
I tried to call function CHANGE_PASSWORD_ON_FIRST_USE before login process and I wanted to redirect user to my own "change password" page 997. But I am always redirected first to default system "change password" page and not to my own.

if (APEX_UTIL.CHANGE_PASSWORD_ON_FIRST_USE (upper(:P101_USERNAME))) then
wwv_flow_custom_auth_std.login(
    P_UNAME       => :P101_USERNAME,
    P_PASSWORD    => :P101_PASSWORD,
    P_SESSION_ID  => v('APP_SESSION'),
    P_FLOW_PAGE   => :APP_ID||':997'
    );
else
wwv_flow_custom_auth_std.login(
    P_UNAME       => :P101_USERNAME,
    P_PASSWORD    => :P101_PASSWORD,
    P_SESSION_ID  => v('APP_SESSION'),
    P_FLOW_PAGE   => :APP_ID||':2'
    );
end if;
So my question is... How should I check if user password is expired and redirect him to my own "change password" page?

Thank you
  • 2. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    I know how to make my own page for changing password and I have one but I need this:

    1) allow user to fill and submit login form
    2) check somehow if user password is not expired
    3) redirect user to my own "change password" page if he has expired password

    Now if user password expired, user is redirected to some standard apex page, with another template, another desing and I would like to use my own page for change of password instead of that one. I think that I can not change design of that default page..
  • 3. Re: custom change password page after password expiration
    Joe Upshaw Journeyer
    Currently Being Moderated
    Maybe I am missing the issue.

    Can you not just select from the database to see if the user is expired?
    SELECT 'Expired'
    FROM DBA_USERS
    WHERE USERNAME = :APEX_ITEM_FOR_USER_ID AND
               ACCOUNT_STATUS LIKE 'EXPIRED%';
    Create an After Submit Computation that sets a hidden page item. In the Computation, issue the above query and set the hidden item accordingly.

    Add a Branch to your fancy, new custom page. Make sure it is set to After Computation, Validation, etc. In that Branch make it conditional upon the hidden page item having a value that indicates that the user has expired.

    -Joe

    Edited by: Joe Upshaw on Mar 15, 2012 3:30 PM
  • 4. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    I am not using database authentication, but using APEX authentication.
    I would like to know how to check if APEX user has expired password and how to redirect him to my own page to change his password. Or better way.. how to change template and look of existing internal apex page that is showed to users when they have to change them passwords.
  • 5. Re: custom change password page after password expiration
    DanielB Pro
    Currently Being Moderated
    use htmldb_util


    procedure fetch_user (
    --
    -- Fetch user information from
    -- wwv_flow_fnd_user, wwv_flow_fnd_group_users and wwv_flow_developers table.
    -- This procedure is overloaded.
    --
    p_user_id in number,
    p_workspace out varchar2,
    p_user_name out varchar2,
    p_first_name out varchar2,
    p_last_name out varchar2,
    p_web_password out varchar2,
    p_email_address out varchar2,
    p_start_date out varchar2,
    p_end_date out varchar2,
    p_employee_id out varchar2,
    p_allow_access_to_schemas out varchar2,
    p_person_type out varchar2,
    p_default_schema out varchar2,
    p_groups out varchar2,
    p_developer_role out varchar2,
    p_description out varchar2,
    p_account_expiry out date,
    p_account_locked out varchar2,
    p_failed_access_attempts out number,
    p_change_password_on_first_use out varchar2,
    p_first_password_use_occurred out varchar2
    );
  • 6. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    Ok with APEX_UTIL.fetch_user I can check if user has expired password. And what to do next?
    User is redirected to standard apex page and has to change password there. I need to redirect user to my own page
  • 7. Re: custom change password page after password expiration
    DanielB Pro
    Currently Being Moderated
    previous to flow page check the user and if blocked redirect to your own page
    this page need to public page
  • 8. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    Ok, I will try it. And last question.
    Is it possible to change design of default "change password" page? This would be simpliest solution for me. I need only to translate labels and put another template to this page.... I can not find this page anywhere....
  • 9. Re: custom change password page after password expiration
    DanielB Pro
    Currently Being Moderated
    see this
    http://www.grassroots-oracle.com/2011/07/modifying-your-apex-login-page.html
  • 10. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    I know how to change LOGIN page and I can see its source in application builder. I don't want to change login page.
    I want to modify page for change user password. You can see that page on this screenshot: http://img210.imageshack.us/img210/6086/screenshotsn.jpg
    It is some page with number 50 in app with ID 4155 some internal apex page...
  • 11. Re: custom change password page after password expiration
    DanielB Pro
    Currently Being Moderated
    and why not create your own change pasword page?
  • 12. Re: custom change password page after password expiration
    DanielB Pro
    Currently Being Moderated
    searching in apex dir
    in \apex

    exists f_4155.sql
    inside
    --application/pages/page_00050
    prompt  ...PAGE 50: Change End User Password
    --
     
    begin
     
    declare
        h varchar2(32767) := null;
        ph varchar2(32767) := null;
    begin
    h:=h||'aadm_pswd.htm';
    
    ph := null;
    wwv_flow_api.create_page(
      p_id     => 50,
      p_flow_id=> wwv_flow.g_flow_id,
      p_tab_set=> '',
      p_name   => 'Change End User Password',
      p_step_title=> 'Change End User Password',
      p_step_sub_title => 'Change End User Password',
      p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
      p_first_item=> 'AUTO_FIRST_ITEM',
      p_include_apex_css_js_yn=>'Y',
      p_help_text => ' ',
      p_html_page_header => '',
      p_step_template => 80887301212076531+ wwv_flow_api.g_id_offset,
      p_required_patch=> null + wwv_flow_api.g_id_offset,
      p_last_updated_by => 'JOEL',
      p_last_upd_yyyymmddhh24miss => '20071121042542',
      p_page_is_public_y_n=> 'Y',
      p_page_comment  => '');
     
    wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>50,p_text=>h);
    end;
     
    end;
    /
    and more code



    see
    http://www.simple-talk.com/sysadmin/general/multi-language-database-applications-using-oracle-apex/
  • 13. Re: custom change password page after password expiration
    cardell Newbie
    Currently Being Moderated
    Thank you, it is that page. In APEX 4.1 it is created by script \apex\builder\f4155.sql
    I am developing application in czech language and it is language that is not supported by APEX builder and environment. I hope it will be supported in the future.
    Unfortunately I don't want to make some changes in APEX source scripts. That page will be be overwrited with every APEX update.
    I will create my own page for changing passwords in my application.

Legend

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