Password & Passkey
Monte Goulding
monte at sweattechnologies.com
Tue Jun 24 00:36:00 EDT 2003
>
> I am trying to access the ''authorised users' stack within the standalone
> preopenstack script, extract the users and put them into the
> popup. Is this an
> OK thing to try to do? i.e. open and access a stack in the
> preopenstack handler
> of another stack? If I use a proper path, does the Passkey
> command open the
> stack, or do I need the path in a 'get' statement? Or can I 'get' with
> Passkey?
Hi David
Use a custom property set in the stackfile to store username,passkey pairs.
Then do this in the preOpenStack handler:
-- tPath = path to stack file
put the customKeys["cUsers"] of stack tPath into btn "popup"
Then when the user has entered the password and clicked OK:
-- tUser = username
-- tPassword = entered password
if the cUsers[tUser] of stack tPath <> tPassword then
-- try again
end if
If you want live update the users list you could have a button that replaces
the users stack:
delete stack tPath
put url "http://yourdomain/users.rev" into url ("binfile:"&tPath)
put the customKeys["cUsers"] of stack tPath into btn "popup"
Cheers
Monte
More information about the use-livecode
mailing list