Kbase 18295: Code sample to allow user to change their own password
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/5/1998 |
|
Code sample to allow user to change their own password
INTRODUCTION:
=============
This following program illustrates how to allow the user of
a database to change their own password without going through
the Progress Data Administration.
PROCEDURAL APPROACH:
===================
define var x as char view-as fill-in no-undo.
define button btnupd label "&Update Password".
define button btnexit label "&Exit".
define frame frame1
x label "Enter New Password" skip(1)
btnupd btnexit
with side-labels.
on choose of btnupd do:
/* lookup the _user record based on the userid of user logged in */
find _user where _user._userid = userid.
/* must use the encode function hereto ensure password encryption */
assign _user._password = encode(x:screen-value).
message "Password has been successfully changed."
view-as alert-box information.
end.
enable all with frame frame1.
wait-for choose of btnexit.
REFERENCES TO WRITTEN DOCUMENTATION:
===================================
Please refer to the Progress Language Reference documentation for
full descriptions on userid and encode functions.