eZ\Publish\Core\FieldType\User\UserStorage\Gateway\LegacyStorage::getFieldData PHP Method

getFieldData() public method

The User storage handles the following attributes, following the user field type in eZ Publish 4: - hasStoredLogin - contentobjectId - login - email - passwordHash - passwordHashType - isEnabled - maxLogin
public getFieldData ( mixed $fieldId, mixed $userId = null ) : array
$fieldId mixed
$userId mixed
return array
    public function getFieldData($fieldId, $userId = null)
    {
        $userId = $userId ?: $this->fetchUserId($fieldId);
        $userData = $this->fetchUserData($userId);
        if (!isset($userData['login'])) {
            return $this->defaultValues;
        }
        $result = array_merge($this->defaultValues, array('hasStoredLogin' => true), $userData, $this->fetchUserSettings($userId));
        return $result;
    }