cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@kompuart.pl (Leszek Gawron)
Subject Re: Redirect depending on action?
Date Tue, 23 Jul 2002 07:11:33 GMT
On Mon, Jul 22, 2002 at 02:46:45PM -0400, Spectron International, Inc. wrote:
> I have a password protected site. When a new user is added the password is
> the same as the user name. I want to redirect to a "change password" page if
> it is the first time he has logged in (username=password). How can I do
> that?
Write simple server pages action that queries the database and returns success
if user has logged in before or false if never before. Then the sitemap looks
like:

<map:match pattern="welcome">
	<map:act type="serverpages" src="validatepassword.xsp">
		<!-- got here - it means that password is ok>
		<map:redirect-to "cocoon://welcome2"/>
	</map:act>
	<map:redirect-to "cocoon://changepass"/>
</map:match>

of course you need also a db_authenticator prior to validatepass action
you can also place /welcome2 in internal-only pipeline so it's not available
directly
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message