Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking password within form
Message
De
04/08/1999 22:26:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00250033
Message ID:
00250045
Vues:
26
Hi Jane,

>I want to check a password whenever the user selects new, delete, or save from command buttons. I'm not certain how to do it. If these buttons are selected, I then set visible to .t. for the password textbox. Where do I check that the password is correct?

Most Frameworks have an User object which contains the username as well as methods to return rights to a speciefic object. You assume if the App is up and running the user entered the password to get in, so checking if the password is correct when you start a form should be done another way: when the form startsup check the users rights by comparing the username (property in User Manager) and object name (passed)

>How do I allow for 3 tries to enter the password. Do I write a function to do this? Where do I put it? I know how to do it in DOS but not in Windows.

In your login have a variable nTries=0. If the user logs in with an incorrect password, increment nTrie by 1 and check if it at 3. If its not let them try again, otherwise continue on your way.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform