Solved Changing user's password

Amako

New member
Local time
Today, 17:01
Joined
Jul 5, 2020
Messages
8
Hello everyone.
I made a really simple database for our association. To log in it have a login form. The users ask to have the ability to change their password and and I can't do it despite all the research I do. I am new to vba and everything I find on it seem really complicate to me. Having the login form code was not easy.
Thanks to everyone who can help me with the attached file.
 

Attachments

here test this.
 

Attachments

Thanks very much arnelgp. It's working far beyond my expectations.
A last thing. I think it would be good to force them to change their password on the first connection. Sorry I should have said it on the first post.
 
ok, goodluck chum!
 
OK isladogs, I'm going to take a look at your example
 
I read the page and I think that your example is a very high level considering my project and I wonder if I can just extract the part to force the user to change his password. But I'm going to try.
 
added 3 fields to User table:

LastPasswordChange
DaysAfterChange
ForceChangePass

DaysAfterChange was adjusted 1 month before (1 month before Today).
see change in code in form Login.
 

Attachments

I read the page and I think that your example is a very high level considering my project and I wonder if I can just extract the part to force the user to change his password. But I'm going to try.

If arnel's code does what you want, you may not need to do so but it would be useful to do so even if just as a learning exercise.

Anyway, that was my intention when I suggested you look at it.
In the example app, when a new user is added their password is stored as 'Not Set' (but encrypted).
When the user tries to login, the code checks if that is still the saved password and, if so, forces the user to change it before log in is allowed.
In other words this happens the first time they login.

BTW I strongly recommend that passwords are encrypted for security and data protection
 
If arnel's code does what you want, you may not need to do so but it would be useful to do so even if just as a learning exercise.

Anyway, that was my intention when I suggested you look at it.
In the example app, when a new user is added their password is stored as 'Not Set' (but encrypted).
When the user tries to login, the code checks if that is still the saved password and, if so, forces the user to change it before log in is allowed.
In other words this happens the first time they login.

BTW I strongly recommend that passwords are encrypted for security and data protection

Your example is very great and you explain it very well there. I keep it for when I will try to make a more complex application (witch I think will be soon) or for an eventual friend in need. Also I see a bunch of good things there. Thank you.
 
added 3 fields to User table:

LastPasswordChange
DaysAfterChange
ForceChangePass

DaysAfterChange was adjusted 1 month before (1 month before Today).
see change in code in form Login.
Thank you arnelgp, with that the application is ready.
 

Users who are viewing this thread

Back
Top Bottom