Archive of UserLand's first discussion group, started October 5, 1998.
Different Nirvana Membership Pages
Author: John Simms Posted: 1/5/1999; 1:56:54 PM Topic: Different Nirvana Membership Pages Msg #: 1848 Prev/Next: 1847 / 1849
Your Nirvana website can use multiple membership pages.All of this works on the assumption that if there's a pta^.adrMemberInfo item, that the user has been authenticated somewhere along the line. Whether it was this request or another one, it doesn't matter. You can also check pta^.memberGroupName to make sure they're in a specific group, but I don't in my examples.
First, you need to create your own form, because the macro members.logonForm has it's own default urls it uses. So, I've got an object "default" that looks like this:
#title "Please login"
Next, you need the page you want a member taken to after a successfull logon. I've used scripts for these, but macros in a page should work as well.
I have a script named "siteOne" in the same table as default:
local (pta = html.getPageTableAddress());
if defined (pta^.adrMemberInfo) { //We know them, let's play
local (memberTableAdr = pta^.adrMemberInfo);
local (memberKey = nameof (memberTableAdr^));
pta^.title = "Welcome to Site One";
return "Dear " memberkey ",
Thank you for visitng my site"}else { //We don't know them.
mainResponder.redirect("default")}
Now, the form's action is where the trick is. The $logonForm is VERY important. It's the flag for Nirvana to check the submitted form for authentication. Nirvana does this, and if successful, your page is called up. So you can specify any page in the action part of the form tag you want to have called up after authentication, so long as you tack on the $logonForm part.
For this to work, you also need to have updated your mainResponder.root after 12:00 noon pacific 1/5/98 to get an updated members.checkMembership that enables the $logonForm trick to work.
Download a working example from:
http://www.john.pair.com/release/sites.root.sit
There are responses to this message:
- Re: Different Nirvana Membership Pages, John Simms, 4/18/1999; 11:52:48 AM
This page was archived on 6/13/2001; 4:47:04 PM.
© Copyright 1998-2001 UserLand Software, Inc.