Neos.Neos/Classes/Controller/Module/Administration/UsersController.php
public function createElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)
    {
        /** @var User $user */
        $user->addElectronicAddress($electronicAddress);
        $this->userService->updateUser($user);

        $this->addFlashMessage('An electronic address "%s" (%s) has been added.', 'Electronic address added', Message::SEVERITY_OK, [htmlspecialchars($electronicAddress->getIdentifier()), htmlspecialchars($electronicAddress->getType())], 1412374814);
        $this->redirect('edit', null, null, ['user' => $user]);
    }
public function createElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)
    {
        /** @var User $user */
        $user->addElectronicAddress($electronicAddress);
        $this->userService->updateUser($user);

        $this->addFlashMessage('An electronic address "%s" (%s) has been added.', 'Electronic address added', Message::SEVERITY_OK, [htmlspecialchars($electronicAddress->getIdentifier()), htmlspecialchars($electronicAddress->getType())], 1412374814);
        $this->redirect('edit', null, null, ['user' => $user]);
    }
public function createElectronicAddressAction ( User $ user , ElectronicAddress $ electronicAddress ) { /** @var User $user */ $ user -> addElectronicAddress ( $ electronicAddress ) ; $ this -> userService -> updateUser ( $ user ) ; $ this -> addFlashMessage ( 'An electronic address "%s" (%s) has been added.' , 'Electronic address added' , Message :: SEVERITY_OK , [ htmlspecialchars ( $ electronicAddress -> getIdentifier ( ) ) , htmlspecialchars ( $ electronicAddress -> getType ( ) ) ] , 1412374814 ) ; $ this -> redirect ( 'edit' , null , null , [ 'user' => $ user ] ) ; }
Create an new electronic address

@param User $user
@param ElectronicAddress $electronicAddress
@return void
Create an new electronic address