Archive of UserLand's first discussion group, started October 5, 1998.

Re: DG security Check

Author:Stan Purington
Posted:5/14/1999; 12:46:48 PM
Topic:DG security Check
Msg #:6236 (In response to 6190)
Prev/Next:6235 / 6237

We decided that the simplist solution might be to insert just a small bit of code in the existing scripts.

In mainresponder.members.checkmembership where it calls sendmail we made the following modification.

"signupform" {
	with adrmembers^ {
		local (mailaddress = string.urldecode (args.mailaddress));
		
		// MY CODE HERE - checks for user email in external database
		if workspace.checkSSAUser(mailaddress,@scratchPad.userdata) {
			mainresponder.members.sendMail (mailaddress, adrmembers);
			adrparamtable^.userOK = true}
		else {
			// I want to redirect the user to a different page here
			// originally put mainresponder.redirect("someurl") here
			// but got errors
			
			adrparamtable^.userOK = false};
		// END MY CODE
		
		adrparamtable^.mailAddress = mailaddress; //make it available to the logon macro
		
		«adrobject = @parentof (adrobject^)^.checkYourMail //redirection, fast!
		scriptError ("!redirect " + adratts^.urls^.memberCheckMail + "$" + mailaddress)}}

We originally put a mainresponder.redirect("some url") in the else, which just gave us an error "Can’t find a sub-table named pageTableAddresses."

Then decided to put a final filter script in the logon area. The script would check to see if the user is ok then set the redirect.

on finalFilter (adrPageTable) {
	if !adrPageTable^.userOK {
		mainresponder.redirect("http://someurl/")};
	return (true)}		

Got an error "Can’t evaluate the expression because the name “userOK” hasn’t been defined"

I must be missing something somewhere, right?


There are responses to this message:


This page was archived on 6/13/2001; 4:50:09 PM.

© Copyright 1998-2001 UserLand Software, Inc.