/**
* Update a given account, ie. the password
*
* @param array $password Expects an array in the format array('<password>', '<password confirmation>')
* @Flow\Validate(argumentName="password", type="\Neos\Neos\Validation\Validator\PasswordValidator", options={ "allowEmpty"=1, "minimum"=1, "maximum"=255 })
* @return void
*/
public function updateAccountAction(array $password = array())
{
$user = $this->currentUser;
$password = array_shift($password);
if (strlen(trim(strval($password))) > 0) {
$this->userService->setUserPassword($user, $password);
$this->addFlashMessage('The password has been updated.', 'Password updated', Message::SEVERITY_OK);
}
$this->redirect('index');
}