concrete/src/User/CsvWriter.php
private function projectUser(UserInfo $user)
    {
        yield $user->getUserName();
        yield $user->getUserEmail();

        $userRegistrationDate = $user->getUserDateAdded();
        yield $this->date->formatCustom(\DateTime::ATOM, $userRegistrationDate);

        list($active, $inactive) = $this->getTranslatedStatus();
        yield $user->isActive() ? $active : $inactive;
        yield $user->getNumLogins();

        $attributes = $this->getAttributeKeys();
        foreach ($attributes as $attribute) {
            $value = $user->getAttributeValueObject($attribute);
            yield $value ? $value->getPlainTextValue() : '';
        }
    }
private function projectUser(UserInfo $user)
    {
        yield $user->getUserName();
        yield $user->getUserEmail();

        $userRegistrationDate = $user->getUserDateAdded();
        yield $this->date->formatCustom(\DateTime::ATOM, $userRegistrationDate);

        list($active, $inactive) = $this->getTranslatedStatus();
        yield $user->isActive() ? $active : $inactive;
        yield $user->getNumLogins();

        $attributes = $this->getAttributeKeys();
        foreach ($attributes as $attribute) {
            $value = $user->getAttributeValueObject($attribute);
            yield $value ? $value->getPlainTextValue() : '';
        }
    }
private function projectUser ( UserInfo $ user ) { yield $ user -> getUserName ( ) ; yield $ user -> getUserEmail ( ) ; $ userRegistrationDate = $ user -> getUserDateAdded ( ) ; yield $ this -> date -> formatCustom ( \ DateTime :: ATOM , $ userRegistrationDate ) ; list ( $ active , $ inactive ) = $ this -> getTranslatedStatus ( ) ; yield $ user -> isActive ( ) ? $ active : $ inactive ; yield $ user -> getNumLogins ( ) ; $ attributes = $ this -> getAttributeKeys ( ) ; foreach ( $ attributes as $ attribute ) { $ value = $ user -> getAttributeValueObject ( $ attribute ) ; yield $ value ? $ value -> getPlainTextValue ( ) : '' ; } }
Turn a user into an array
@param \Concrete\Core\User\UserInfo $user
@return array
Turn a user into an array