Re: Using QuickForm an LiveUser together

From: Date: Tue, 16 Mar 2004 09:25:44 +0000
Subject: Re: Using QuickForm an LiveUser together
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11317@lists.php.net to get a copy of this message
<listworks@gmx.ch> wrote : > Hi > > I want to use QuickForm and LiveUser together. Some code how I want to > do it follows: > > <SNIP> > // Create new LoginManager object > $lu = LiveUser::factory($liveuserConfig); > if(!$lu->isLoggedIn()) { > // Display login form and set login form's target > // to $_SERVER['PHP_SELF'] > exit; > } > > if ($lu->checkRight(SOMERIGHT) { > // Create QuickForm instance > // Add QuickForm elements, filters, rules, ... > > if ( $form->validate() ) { > $form->process('process_data', false); > } > } else { > // Tell the user that his rights are not sufficient > } > </SNIP> > > I am using method POST for both, QuickForm and LiveUser. > > Now, after logging in, QuickForm starts validating the form (and > displaying element-rule messages) since some POST variables are set from > the login form. I could get around this by using method GET for > QuickForm and method POST for LiveUser or vice versa. But I don't want > the user to see LiveUser's or QuickForm's variables in the url. > > I have tried to unset LiveUser's paramters with unset$_POST['handle'], > unset$_POST['passwd'] and unset$_POST['Submit']. Unfortunaltey the Form > is not displayed anymore after that. > > Any ideas to get around this without unsing different methods for > LiveUser and QuickForm? > > Thanks in advace! Set $trackSubmit = true in QuickForm constructor. Bertrand Mansion Mamasam

« previous php.pear.general (#11317) next »