This discussion is archived
1 2 Previous Next 24 Replies Latest reply: May 24, 2013 9:01 AM by steveFred Go to original post RSS
  • 15. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    I found one problem with my code, I had

    if upper(userpassword) = upper(p_password) then

    I changed this to

    if upper(v_password) = upper(p_password) then

    so now it compiles
    and runs
    if resetpassword is set to N or any other value except Y, the user can log in
    if I enter a bad user name or a bad password, I get a invalid credentials message
    if resetpassword is set to Y, nothing happens - no message
    if resetpassword is blank, the user is redirected to the page to change their password

    SO, I'm thinking there is something wrong with my redirect logic, but not sure what

    I suppose I could just have the default value for resetpassword be blank

    Here is the current function:

    thanks


    create or replace FUNCTION newLogin (
    p_username IN VARCHAR2,
    p_password IN VARCHAR2)
    RETURN BOOLEAN IS

    v_password myusers.userpassword%TYPE;
    v_return boolean;
    v_reset_password varchar2(1);

    BEGIN


    BEGIN

    SELECT userpassword,
    resetpassword
    into v_password,
    v_reset_password
    FROM myusers
    WHERE upper(username) = upper(p_username);

    exception
    when no_data_found then
    v_password := '~';
    v_reset_password := 'N';

    END;

    if upper(v_password) = upper(p_password) then
    v_return := TRUE;
    else
    v_return := FALSE;
    end if;

    if v_return = TRUE and v_reset_password = 'Y' then
    owa_util.redirect_url('f?p=&APP_ID.:16:&SESSION.::NO:::');
    end if;

    return v_return;

    END;
  • 16. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    TexasApexDeveloper Guru
    Currently Being Moderated
    Simple question.. Can you post your sample application up on Oracle's hosted site and post the login credentials to this thread and I will take a look at your code?

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 17. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    how do I access the hosted site?
  • 18. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    TexasApexDeveloper Guru
    Currently Being Moderated
    http://apex.oracle.com/i/index.html

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 19. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    I requested a workspace,
    I'll let you know when I have it

    thanks
  • 20. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    I got a work space
    I exported a sample application
    and imported into the hosted work space


    http://apex.oracle.com/pls/apex/f?p=4550:1:::::F4550_P1_COMPANY:STEVES


    I can send you logon credentials
    theres no data
    I guess I could import the myusers table
    I cant send any data to actually run the application
  • 21. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    TexasApexDeveloper Guru
    Currently Being Moderated
    Can you post the workspace name, user name and password so I can go in and look at your code?

    Thank you,

    Tony Miller
    LuvMuffin Software
    Ruckersville, VA
  • 22. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    xx

    Edited by: steveFred on May 24, 2013 8:56 AM
  • 23. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    HOLD EVERYTHING

    the client announced this morning that they want this application to authenticate against an external system that they use for other applications. It uses a standard employee id. ( We've been discussing this application for over a year and prior to choosing Apex they looked at several other ideas. I had actually written code to convert the mainframe data to a schema for a vendor product when they decide to use Apex, so a little irritating that this far into things they decide to use a different method of authentication, but they are the client)

    so
    1. I don't need to do this custom authentication
    2. I'm still curious to figure out why my logic doesn't work

    thanks for your help.

    On another note
    This client has 3 levels of security
    1. Administrators who can see everything and update , delete and insert records (ADMIN)
    2. Supervisors who can see everything but read only (EDIT)
    3. Regular employees who can only see some pages (VIEW)

    Edited by: steveFred on May 24, 2013 8:57 AM
  • 24. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
    steveFred Newbie
    Currently Being Moderated
    further discussions with the client
    they went want to use the own extrenal login/ authentication system
    they might not even use Apex at all
    thanks for all your help
1 2 Previous Next

Legend

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