src/ULogin/Init.php
public function setOptional($fields)
    {

        if (empty($fields) === false) {

            if (is_array($fields) === true) {
                $this->optionalFields = implode(',', $fields);
            } else {
                $this->optionalFields = $fields;

            }
        }

        return $this;

    }
public function setOptional($fields)
    {

        if (empty($fields) === false) {

            if (is_array($fields) === true) {
                $this->optionalFields = implode(',', $fields);
            } else {
                $this->optionalFields = $fields;

            }
        }

        return $this;

    }
public function setOptional ( $ fields ) { if ( empty ( $ fields ) === false ) { if ( is_array ( $ fields ) === true ) { $ this -> optionalFields = implode ( ',' , $ fields ) ; } else { $ this -> optionalFields = $ fields ; } } return $ this ; }
Allows you to add to the list of optionals fields.

@param mixed $fields as ('field1', 'field2', ...) or string separated by comma
@example <code>
$this->setOptional([
'bday',
'city',
'sex'
]);

$this->setOptional('bday,city,sex');
</code>
@return Init
Allows you to add to the list of optionals fields .