[Flow] Required argument "account" is not set?

Stefan Thalmeier info at enlay.de
Mon Aug 5 02:37:01 CEST 2013


Hi all,

the updateAction (only minimal logic for this threat) in my AccountController works well if i change the accountItentifier to any unique value, and i get the entered accountItentifier via FlashMessage.

If i type in an existing accountIdentifier (which is already persisted) i get: #1298012500: Required argument "account" is not set.

AccountController
-----------------------------------------------------------------------
/**
* Updates the given account object
*
* @param \TYPO3\Flow\Security\Account $account The account to update
* @param string $firstName
* @param string $lastName
* @param array $password
* @return void
*/
public function updateAction(\TYPO3\Flow\Security\Account $account, $firstName, $lastName, array $password) {
    $accountIdentifier = $account->getAccountIdentifier();
    if ($this->accountRepository->findOneByAccountIdentifier($accountIdentifier) != NULL) {
        $this->addFlashMessage('Username already exists.');
        $this->redirect('edit');
    } else {
    $this->addFlashMessage($accountIdentifier);
    $this->redirect('index');
    }
}
-----------------------------------------------------------------------

I dont undertand the logic:
-> I get the account object and can use it: $accountIdentifier = $account->getAccountIdentifier();
-> If i type in an existing accountIdentifier the account objetct is not set?

Using latest TYPO3 Flow 2.0 final (updated 04-05-2013).

Hope anyone could help me :)
Regards Stefan
-- 
ENLAY


More information about the Flow mailing list