src/Module/Authentication/OAuth.php
protected function getResourceAttribute($name, $resourceOwner)
    {
        // Call resource owner getter first
        $method = "get" . $name;

        if (is_callable(array($resourceOwner, $method))) {
            $res = $resourceOwner->$method();
            return $res;
        } else {
            $resourceArray = $resourceOwner->toArray();
            $res = $this->getValueByKey($resourceArray, $name);
            return $res;
        }
    }
protected function getResourceAttribute($name, $resourceOwner)
    {
        // Call resource owner getter first
        $method = "get" . $name;

        if (is_callable(array($resourceOwner, $method))) {
            $res = $resourceOwner->$method();
            return $res;
        } else {
            $resourceArray = $resourceOwner->toArray();
            $res = $this->getValueByKey($resourceArray, $name);
            return $res;
        }
    }
protected function getResourceAttribute ( $ name , $ resourceOwner ) { // Call resource owner getter first $ method = "get" . $ name ; if ( is_callable ( array ( $ resourceOwner , $ method ) ) ) { $ res = $ resourceOwner -> $ method ( ) ; return $ res ; } else { $ resourceArray = $ resourceOwner -> toArray ( ) ; $ res = $ this -> getValueByKey ( $ resourceArray , $ name ) ; return $ res ; } }
Gets an attribute from the resource owner

@param string $name Attribute name
@param \League\OAuth2\Client\Provider\ResourceOwnerInterface $resourceOwner Resource owner instance
@return mixed The retrieved value
Gets an attribute from the resource owner