Consultor Eletrônico



Kbase P13718: How to verify if a user has entered the correct password?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/5/2008
Status: Verified

GOAL:

How to verify if a user has entered the correct password?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

Use 4GL ENCODE function to verify whether a given string is the password for a given user. The following sample code checks whether the string 'jill' is the password for the user whose userid is 'jack':

FIND FIRST _User WHERE _user._userid = 'jack' NO-LOCK NO-ERROR.

IF AVAILABLE _User THEN
MESSAGE _user._password = ENCODE('jill')
VIEW-AS ALERT-BOX INFO BUTTONS OK.