Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Version 3 Technical Highlights - Securing Accounts===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Sprezzatura Ltd|01 NOV 1992|3.0+|EXPERT|SECUREACCOUNT_SUB, SECURE, ACCOUNT| ==== SecureAccount_Sub ==== Once the account has been created the security for the account may be manipulated using SecureAccount_Sub. This takes four parameters as follows <code> MakeAccount_Sub(Action, AccountName, AccountRow, Flag) </code> where |Action|A code for the action to be performed having the following possible values\\ \\ 0 Read AccountRow and return\\ 1 Write AccountRow and return. Note that this will automatically encrypt the passwords for you, BUT field 1 of the AccountRow must be set to the name of the Account NOT the literal "ACCOUNT"| |AccountName|The name of the account to work with| |AccountRow|The account row for updating/retrieving from the SysEnv table| |Flag|A result flag having the following possible values\\ \\ 1 An account name was not given\\ 2 Valid SysEnv row but not an account\\ 3 Account does not exist\\ 4 Invalid action code passed| Thus to change an account password programmatically one could <code> * Set password to NEW in account TEST Declare Subroutine SecureAccount_Sub, Msg Equ AccountName$ To "TEST" Equ ReadAccount$ To 0 Equ WriteAccount$ To 1 SecureAccount_Sub(ReadAccount$, "TEST", AccRow, Flag) If Flag Then Msg("Error " : Flag) End Else AccRow<1> = "TEST" AccRow<6> = "NEW" ; * Set password to NEW SecureAccount_Sub(WriteAccount$ , "TEST", AccRow, Flag) If Flag Then Msg("Error " : Flag) End </code> (Volume 4, Issue 6, Pages 9,10) tips/revmedia/v4i6a12.txt Last modified: 2024/06/19 20:20by 127.0.0.1