[TYPO3-dev] Problem with submitting form in FE if not logged as admin in the BE

Brian Bendtsen brb at mentor-it.dk
Thu Mar 30 16:39:39 CEST 2006


Hi

I have created an extension where the user can log in and submit some 
data by using a form. While testing it in the FE I was logged in as 
admin in the BE.
It seemed to work fine.

Now I just found out that if im not logged in as admin - or not logged 
in at all - in the BE, the submission doesnt work in the FE.

My code is something like this:

The form:

<form action="'.$link.'" method="post"><input type="hidden" value="save" 
name="tx_boligtilbud_pi1[action]"><input type="hidden" 
name="tx_boligtilbud_pi1[sagsnummer]" 
value="'.$this->internal['currentRow']['caseid'].'"><input type="hidden" 
name="tx_boligtilbud_pi1[cprnr]" value="'.$cprnr.'"><input type="hidden" 
value="'.$GLOBALS["TSFE"]->fe_user->user["uid"].'" 
name="tx_boligtilbud_pi1[userid]"><input type="submit" 
value="'.$this->pi_getLL('Label_acceptbutton','',1).'"></form>

My main function:

if($this->piVars['action']=='save') {
  Do something...
}
else {
  Show form
}

I guess its the piVars['action'] value that is not submitted when im not 
logged in as admin in the BE.

Can someone help? I cant understand the logic in this.

/Brian Bendtsen




More information about the TYPO3-dev mailing list