I think this must be programmed. I think this must be programmed. Insert a Date-Field into the User-Table and let the field updated if you change the Password by Validate-Trigger. Modify then the Codeunit 1 in the procedure "LoginStart" and check the validity of the Password.
Its only an advise!
Stefan
table 2000000002 can be changed by an NSC Developer with a Solution Developer licence, if you are an end user ask your NSC to do the changes for you.
Some simple code in the OnValidate trigger for the password
Password - OnValidate()
IF Password <> xRec.Password THEN BEGIN
// Blank not allowed
TESTFIELD(Password);
"Date Password Changed":=CALCDATE('1M',TODAY);
END;
then as suggested a warning in codeunit 1 when the users password is due to expire.
// DSC 20/02/01 Start Check User Password must not Error....
IF User.GET(USERID)AND(User."Date Password Changed"<>0D)THEN BEGIN
IF LogInDate > User."Date Password Changed" THEN
MESSAGE(''WARNING Your Password has expired contact\'+
'your Systems Administrator to Update your Password');
IF User."Date Password Changed" - LogInDate+1 < 7 THEN
MESSAGE('WARNING Your Password will expire in %1 days Contact\'+
'your Systems Administrator to Update your Password',User."Date Password Changed"-LogInDate+1);
END;
// DSC 20/02/01 END....
I implemented the suggested solution . I have an additional problem / question. When an enduser changes his/her password, he will use the standard navision option (menu - tools - security - password). This form will not trigger a validation on the field Password in table 2000000002 . With a NSC licence I am not authorised to changes this form.
When an end user changes his password, I would like to change my new field User."Date Password Changed" automatically. To make a new form to change the password is no option because the standard navision option to change the password can not be hidden.
table can be changed by an NSC Developer with a Solution Developer licence, if you are an end user ask your NSC to do the changes for you.
Some simple code in the OnValidate trigger for the password
Password - OnValidate()
IF Password <> xRec.Password THEN BEGIN
// Blank not allowed
TESTFIELD(Password);
"Date Password Changed":=CALCDATE('1M',TODAY);
END;
then as suggested a warning in codeunit 1 when the users password is due to expire.
// DSC 20/02/01 Start Check User Password must not Error....
IF User.GET(USERID)AND(User."Date Password Changed"<>0D)THEN BEGIN
IF LogInDate > User."Date Password Changed" THEN
MESSAGE(''WARNING Your Password has expired contact\'+
'your Systems Administrator to Update your Password');
IF User."Date Password Changed" - LogInDate+1 < 7 THEN
MESSAGE('WARNING Your Password will expire in %1 days Contact\'+
'your Systems Administrator to Update your Password',User."Date Password Changed"-LogInDate+1);
END;
// DSC 20/02/01 END....
It is not a good solution but any way, it must work.
Add new fied an every time user starts application, compare these two values.
For example
IF UserPasswords.Password <> UserPasswords."Old Password" THEN BEGIN
UserPasswords."Last Date Modified" := TODAY;
UserPasswords."Old Password" := UserPasswords.Password;
UserPasswords.MODIFY;
END;
So you will always have a last modification date.
Do not forget to set correct properties for field "Old Password"
Comments
Its only an advise!
Stefan
Paul Olivier
table 2000000002 can be changed by an NSC Developer with a Solution Developer licence, if you are an end user ask your NSC to do the changes for you.
Some simple code in the OnValidate trigger for the password
Password - OnValidate()
IF Password <> xRec.Password THEN BEGIN
// Blank not allowed
TESTFIELD(Password);
"Date Password Changed":=CALCDATE('1M',TODAY);
END;
then as suggested a warning in codeunit 1 when the users password is due to expire.
// DSC 20/02/01 Start Check User Password must not Error....
IF User.GET(USERID)AND(User."Date Password Changed"<>0D)THEN BEGIN
IF LogInDate > User."Date Password Changed" THEN
MESSAGE(''WARNING Your Password has expired contact\'+
'your Systems Administrator to Update your Password');
IF User."Date Password Changed" - LogInDate+1 < 7 THEN
MESSAGE('WARNING Your Password will expire in %1 days Contact\'+
'your Systems Administrator to Update your Password',User."Date Password Changed"-LogInDate+1);
END;
// DSC 20/02/01 END....
MindSource (UK) Limited
Navision Service Partner
david@mindsource.co.uk
info@mindsource.co.uk
Navision Service Partner
david@mindsource.co.uk
info@mindsource.co.uk
When an end user changes his password, I would like to change my new field User."Date Password Changed" automatically. To make a new form to change the password is no option because the standard navision option to change the password can not be hidden.
Has anybody some suggestions ?
Greetings,
Andre - Almere (NL)
IMHO it is the only way to go that works long term.
:idea: try this article
http://www.devx.com/security/Article/21522
Add new fied an every time user starts application, compare these two values.
For example
IF UserPasswords.Password <> UserPasswords."Old Password" THEN BEGIN
UserPasswords."Last Date Modified" := TODAY;
UserPasswords."Old Password" := UserPasswords.Password;
UserPasswords.MODIFY;
END;
So you will always have a last modification date.
Do not forget to set correct properties for field "Old Password"