1 2 Previous Next 24 Replies Latest reply on May 24, 2013 4:01 PM by steveFred Go to original post
      • 15. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
        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:


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

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



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

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


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

        if v_return = TRUE and v_reset_password = 'Y' then
        end if;

        return v_return;

        • 16. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
          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
            how do I access the hosted site?
            • 18. Re: CHANGE_PASSWORD_ON_FIRST_USE Function

              Thank you,

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

                • 20. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
                  I got a work space
                  I exported a sample application
                  and imported into the hosted work space


                  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
                    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

                      Edited by: steveFred on May 24, 2013 8:56 AM
                      • 23. Re: CHANGE_PASSWORD_ON_FIRST_USE Function
                        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)

                        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
                          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