Author Topic

Bruce Morrison

Tuesday 19 February 2008 2:52:00 am

Comment49106

Hi Piotrek

Try storing the POST variables in the session then redirecting to content/action...from user/login.php

    
    // Save array of previous post variables in session variable
    $post = $http->attribute( 'post' );
    $lastPostVars = array();
    foreach ( array_keys( $post ) as $postKey )
    {
        if ( substr( $postKey, 0, 5 ) == 'Last_' )
            $lastPostVars[ substr( $postKey, 5, strlen( $postKey ) )] = $post[ $postKey ];
    }
    if ( count( $lastPostVars ) > 0 )
    {
        $postData = $lastPostVars;
        $http->setSessionVariable( 'LastPostVars', $lastPostVars );
    }

content/action.php merges these with it's own POST variables. I think the is the mechanism that allows object creation to continue after a login is required.

I'll leave it for now but I'm positive it's possible and not difficult ;)

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish