src/Command/UserEditCommand.php
protected function getNewValues(User $user)
    {
        $newProps = new UserUpdater();
        $this->logger->section('Editing user ' . $user->getEmail() . ' (' . $user->getUsername() . ')');
        $this->logger->comment('leave empty to keep unchanged');
        $newProps->setUsername($this->ask(new Question('Username', $user->getUsername())));
        $newProps->setEmail($this->ask(new Question('E-mail address', $user->getEmail())));
        $password = $this->ask(new Question('Password', '***'));
        // replace default *** value if empty is given
        $newProps->setPassword($password !== '***' ? $password : '');

        return $newProps;
    }
protected function getNewValues(User $user)
    {
        $newProps = new UserUpdater();
        $this->logger->section('Editing user ' . $user->getEmail() . ' (' . $user->getUsername() . ')');
        $this->logger->comment('leave empty to keep unchanged');
        $newProps->setUsername($this->ask(new Question('Username', $user->getUsername())));
        $newProps->setEmail($this->ask(new Question('E-mail address', $user->getEmail())));
        $password = $this->ask(new Question('Password', '***'));
        // replace default *** value if empty is given
        $newProps->setPassword($password !== '***' ? $password : '');

        return $newProps;
    }
protected function getNewValues ( User $ user ) { $ newProps = new UserUpdater ( ) ; $ this -> logger -> section ( 'Editing user ' . $ user -> getEmail ( ) . ' (' . $ user -> getUsername ( ) . ')' ) ; $ this -> logger -> comment ( 'leave empty to keep unchanged' ) ; $ newProps -> setUsername ( $ this -> ask ( new Question ( 'Username' , $ user -> getUsername ( ) ) ) ) ; $ newProps -> setEmail ( $ this -> ask ( new Question ( 'E-mail address' , $ user -> getEmail ( ) ) ) ) ; $ password = $ this -> ask ( new Question ( 'Password' , '***' ) ) ; // replace default *** value if empty is given $ newProps -> setPassword ( $ password !== '***' ? $ password : '' ) ; return $ newProps ; }
Ask for new user properties

@param User $user

@return UserUpdater
Ask for new user properties