Home » Developer & Programmer » Forms » Making use of password change function through forms
Making use of password change function through forms [message #268421] Tue, 18 September 2007 09:33 Go to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
Hi,
I have a oracle form(version 6) for changing the user passwords.
It contains user name,old password,new password and confirm password fields and OK and Cancel buttons.
Some users are assigned a newly created profile(backend)
We have managed to create users under that different profile and want to make them change their passwords compulsarily after 3 months(this is also set in database level).
There is a function(we modified a little bit ,the program from oracle for verifying password ) in the database and it is working fine at the database level-means if the password is short, or if it is not having letters and if the password is a common word and so on--there are a number of cases the function checks.
How to implement the same in forms?ie, i want to get the error messages thrown by databse function in the forms level.Presently it is showing oracle error messages which I want to replace.
Please give the reply in a little bit detail - ie, what all to do in forms and where?Any help appreciated
Thanks

[Updated on: Tue, 18 September 2007 09:44]

Report message to a moderator

Re: Making use of password change function through forms [message #268509 is a reply to message #268421] Tue, 18 September 2007 23:47 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please post the error code and error message. I suggest that you search this forum for 'logon password' and see what other people have done in the past.

David
Re: Making use of password change function through forms [message #268625 is a reply to message #268509] Wed, 19 September 2007 03:33 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
There is no error.This is just a new requirement I need to implement.So I am looking for suggestions to do that.
Someone plz help as i cant see anything related to this after searching

[Updated on: Wed, 19 September 2007 08:17]

Report message to a moderator

Re: Making use of password change function through forms [message #268819 is a reply to message #268625] Wed, 19 September 2007 18:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Swapna,

Is this your first form? Have you been on a Forms training course?

David
Re: Making use of password change function through forms [message #269015 is a reply to message #268819] Thu, 20 September 2007 07:54 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
somebody pls help on this.
i have developed forms a few years back.
I got the basic form which shows the oracle error message now
Why it is not checking in database level based on profile information?
Profile implemented thru a function, supplied by oracle in database level and it is working fine

[Updated on: Thu, 20 September 2007 07:55]

Report message to a moderator

Re: Making use of password change function through forms [message #269168 is a reply to message #269015] Thu, 20 September 2007 22:52 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please post the whole procedure or trigger code (between 'code' tags) that you are using to call your database routine.

David
Re: Making use of password change function through forms [message #269252 is a reply to message #269168] Fri, 21 September 2007 06:30 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
This is the existing code which was previously written
But it will change password whatever new password i give- no cheking at all
I want to get the same result in the database level for password checking
begin
declare current_password varchar2(30);
        current_user     varchar2(30);
        x                number;
        ddl_string       varchar2(100);

begin

    current_password := upper(get_application_property(password));
    current_user     := upper(get_application_property(username));

    --if (:change_pass.old_password is null or :change_pass.new_password is null
    --	  or :change_pass.new_password_2 is null)then
    --	  null;
    if length(:change_pass.new_password) < 6 then
        x := show_alert('new_pw_too_short');
--don't validate old password if trying to change someone else's password, 
    elsif 
          (upper(:change_pass.old_password) != current_password
          or upper(:change_pass.old_password)is null) then
           x := show_alert('incorrect_old_pw');
    elsif (upper(:change_pass.new_password) != upper(:change_pass.new_password_2)
    	    or upper(:change_pass.new_password)is null
    	     or upper(:change_pass.new_password_2)is null) then
              x := show_alert('not_verified');
          elsif upper(:change_pass.old_password) =  upper(:change_pass.new_password) then
                 x := show_alert('new_pw_same_as_old_pw');
             else
                 ddl_string := 'alter user '|| upper(:change_pass.current_username) ||
                               ' identified by '||'"'|| upper(:change_pass.new_password)||'"';
-- uncomment when Oracle 8 --> dbms_utility.exec_ddl_statement(ddl_string);
                 forms_ddl(ddl_string);
--
                 x := show_alert('password_changed');
                 exit_form;
             end if;

exception
    when others then
        if sqlcode = -01031 then
            x := show_alert('no_privilege');
        else
            x:= show_alert('use_alphanumerics');
        end if;
end;
end;
Re: Making use of password change function through forms [message #269641 is a reply to message #269252] Sun, 23 September 2007 23:33 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Is the database code a procedure or a function? If a function then change the first 'IF' test to pass the new password and if the return code indicates 'success' then do the 'ddl' statement. If NOT a 'success' then shoiw the 'alert'. If it is a procedure then invoke the procedure and use the return code in the 'IF' statement.

David
Re: Making use of password change function through forms [message #269767 is a reply to message #269641] Mon, 24 September 2007 08:08 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
Hi,
There is a function verify_function(sample code supplied by oracle) which do the password checks.This is compiled in the SYS schema.This function is attached to a profile and the profile is attachd to the selected users.
If trying to change the password through sqplus for those users having the above profile, all the messages(password checks) specified in the password change function is coming.
Through the forms, we need to do the checks for all the users regardless of their profile.But for those users with the profile as mentioned above, the same messages in database level should appear.
Is this achievable through what you said?I dont understand fully also.Do you mind giving the code for this, or explain a little bit detail?
Re: Making use of password change function through forms [message #269848 is a reply to message #269767] Mon, 24 September 2007 19:27 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Consider running your function through SQL*Plus via the 'host' command spooling the output and then reading that output via your form and then display the various messages in a large text item with 'wrap' turned on.

David
Re: Making use of password change function through forms [message #270004 is a reply to message #269848] Tue, 25 September 2007 06:53 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
Could you Pls explain in a bit detail?
The users are not going to use sqlplus just forms
Pls give me the modifications i have to make in forms
Re: Making use of password change function through forms [message #270142 is a reply to message #270004] Tue, 25 September 2007 22:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What are the parameters to this function?

David
Re: Making use of password change function through forms [message #271317 is a reply to message #270142] Mon, 01 October 2007 04:36 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
user id, password and old password
Re: Making use of password change function through forms [message #272170 is a reply to message #271317] Thu, 04 October 2007 03:01 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Then where are the messages?

David
Re: Making use of password change function through forms [message #272510 is a reply to message #272170] Fri, 05 October 2007 06:06 Go to previous messageGo to next message
aviana
Messages: 106
Registered: July 2007
Senior Member
what do you mean?what messages?
I think there is nobody here to help
Please give me the right code if you can!
Re: Making use of password change function through forms [message #272866 is a reply to message #272510] Mon, 08 October 2007 01:36 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In you first post you say:
Quote:

How to implement the same in forms?ie, i want to get the error messages thrown by databse function in the forms level.Presently it is showing oracle error messages which I want to replace.

How about you search this forum for 'logon' and 'login' and look at the code that other people have used.

David
Previous Topic: Display Excel column names in a form List Item Elements
Next Topic: How do I set global font (Type and Size) setting in forms?
Goto Forum:
  


Current Time: Mon Mar 10 14:29:35 CDT 2025