Neos.Neos/Classes/Controller/Module/Administration/UsersController.php
public function deleteElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)
    {
        $user->removeElectronicAddress($electronicAddress);
        $this->userService->updateUser($user);

        $this->addFlashMessage('The electronic address "%s" (%s) has been deleted for "%s".', 'Electronic address removed', Message::SEVERITY_NOTICE, [htmlspecialchars($electronicAddress->getIdentifier()), htmlspecialchars($electronicAddress->getType()), htmlspecialchars($user->getName())], 1412374678);
        $this->redirect('edit', null, null, ['user' => $user]);
    }
public function deleteElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)
    {
        $user->removeElectronicAddress($electronicAddress);
        $this->userService->updateUser($user);

        $this->addFlashMessage('The electronic address "%s" (%s) has been deleted for "%s".', 'Electronic address removed', Message::SEVERITY_NOTICE, [htmlspecialchars($electronicAddress->getIdentifier()), htmlspecialchars($electronicAddress->getType()), htmlspecialchars($user->getName())], 1412374678);
        $this->redirect('edit', null, null, ['user' => $user]);
    }
public function deleteElectronicAddressAction ( User $ user , ElectronicAddress $ electronicAddress ) { $ user -> removeElectronicAddress ( $ electronicAddress ) ; $ this -> userService -> updateUser ( $ user ) ; $ this -> addFlashMessage ( 'The electronic address "%s" (%s) has been deleted for "%s".' , 'Electronic address removed' , Message :: SEVERITY_NOTICE , [ htmlspecialchars ( $ electronicAddress -> getIdentifier ( ) ) , htmlspecialchars ( $ electronicAddress -> getType ( ) ) , htmlspecialchars ( $ user -> getName ( ) ) ] , 1412374678 ) ; $ this -> redirect ( 'edit' , null , null , [ 'user' => $ user ] ) ; }
Delete an electronic address action

@param User $user
@param ElectronicAddress $electronicAddress
@return void
Delete an electronic address action