[TYPO3-mvc] Double-check Password

Valery Romanchev [typo3lab.ru] romanchev at typo3lab.ru
Wed Aug 11 13:06:23 CEST 2010


01.02.2010 10:07, Steffen Ritter пишет:
> Boris Meier schrieb:
>> Hi together,
>>
>> Probably an easy task, but I don't see the solution right now:
>> Has somebody already implemented a server-side double-check for a
>> controll-password from a second form-field? Or how can I pass this
>> controll-password to the ObjectValidator?
>>
>> Cheers
>> Boris
>>
>>
> I did, just add an additional field not mapped to an property.
> In your action you can compare the value
> §this->request->getArgument('nameofPasswortField2') ==
> $passedObject->getPassword
>
> regards
>
> Steffen

It seems to be better to put this validation to 
Classes/Domain/Validator/ObjectValidator.php because if we put it to an 
action in Classes/Controller/ObjectController.php we will not see the 
form filled with values, that user just input.

It seems, that we should use $_POST in 
Classes/Domain/Validator/ObjectValidator.php because no other way to get 
arguments that was just submitted:  $_POST['tx_myext_pi1']['somefieldname']
(may be we can use $extkey somehow in this context)


-- 
Valery Romanchev
web-developer
TYPO3 Laboratory, Moscow, Russia
http://www.typo3lab.ru


More information about the TYPO3-project-typo3v4mvc mailing list