Using QuickForm an LiveUser together
| From: | Marco Schuler | Date: | Tue, 16 Mar 2004 08:05:00 +0000 |
| Subject: | Using QuickForm an LiveUser together | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11316@lists.php.net to get a copy of this message | ||
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!
--
Regards
Marco