Class wwUserSecurity

See Also ß

Parent Class: custom

The wwUserSecurity class is a business object that handles managing users and logons using a FoxPro table. The class provides basic user administration features for adding, editing and deleting users and authenticating users through this user table. In addition the class can also work with NT security to validate users.

The wwLoginDialog and wwUserAdminDialog classes provide UI and HTML services for Authentication and Administration dialogs.

Properties, Events and Methods

Name Type Description
Authenticate MethodThis is the main method used to authenticate a user. Depending on whether the authentication mode is set to use the internal file or NT Authentication this method returns .T. or .F. for success.
o.Authenticate(lcusername, lcpassword)
AuthenticateNT MethodChecks the username and password against NT Authentication.
o.AuthenticateNT(lcUsername, lcPassword, lcDomain, lnFlags)
CreateTable MethodCreates a new user table and or updates an existing file to the latest structure. Make sure cFileName is set and includes a .DBF extension.
o.CreateTable(lcFilename)
DeleteUser MethodDeletes the currently selected user as specified in the oUser member. User is accessed by his PK.
o.DeleteUser()
GetUser MethodRetrieves a user data record object without affecting the currently active user. Pass in a PK or Username and Password. GetUser always returns a record unless the record cannot be found. Use Logon to check for Active and Expired status.
o.getuser(lcPK, lcPassword)
NewUser MethodCreates a new user record and stores it in the user data. Note this method returns .T. or .F. only, but creates an empty oUser structure that you can fill. Then use SaveUser() to commit the new user's settings.
o.newuser()
Reindex MethodCompacts and reindexes the user file.
o.reindex(llUpdateStructure)
SaveUser MethodSaves the currently active user as specified in the oUser member object to file.
o.SaveUser()
calias PropertyAlias of the user file.
cdomain PropertyDomain name when using NT Authentication for request.
cerrormsg PropertyHolds error messages when lError = True or when any methods return False.
cfilename PropertyFilename for the user file.
cpassword PropertyPassword for the user.
cusername PropertyUser name for the user.
lerror PropertyError Flag. True when an error occurs during any operation. Set but not required as most methods return True or False.
nauthenticationmode PropertyDetermines how authentication of the username and password is performed.
ndefaultaccounttimeout PropertyThe default value when the account should time out in days. Leave this value at 0 to force the account to never timeout.
nminpasswordlength PropertyThe minimum length for a password specified. Checked before a user is saved to disk.


Last Updated: 04/15/00