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

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

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

            }
        }

        return $this;
    }
public function setFields($fields)
    {

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

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

            }
        }

        return $this;
    }
public function setFields ( $ fields ) { if ( empty ( $ fields ) === false ) { if ( is_array ( $ fields ) === true ) { $ this -> requiredFields = implode ( ',' , $ fields ) ; } else { $ this -> requiredFields = $ fields ; } } return $ this ; }
Allows you to add to the list of fields requested for the provider's authorization.

@param mixed $fields as ('field1', 'field2', ...) or string separated by comma
@example <code>
$this->setFields([
'first_name',
'last_name',
'photo'
]);

$this->setFields('first_name,last_name,photo');
</code>
@return Init
Allows you to add to the list of fields requested for the provider s authorization .