[JUM] Connected Accounts

[JUM] Connected Accounts 2.1.1

No permission to download
Is it possible to change the colors of the providers? Instagram has the "Twitch Purple" color that I'd like to change :)
 
Is it possible to change the colors of the providers? Instagram has the "Twitch Purple" color that I'd like to change :)
In fact, Twitch has a different color, and the color of the instagram button is taken from the official color scheme.
However, you can do it this way:
CSS:
.button.button--provider--instagram,
a.button.button--provider--instagram {
  background-color: your_color_here;
  border-color: your_color_here;
}
 
PHP:
[
                    'provider_id' => 'vkontakte',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Vkontakte',
                    'display_order' => 9,
                    'options' => ''
                ],
                [
                    'provider_id' => 'odnoklassniki',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Odnoklassniki',
                    'display_order' => 11,
                    'options' => ''
                ],
                [
                    'provider_id' => 'reddit',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Reddit',
                    'display_order' => 19,
                    'options' => ''
                ],
                [
                    'provider_id' => 'instagram',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Instagram',
                    'display_order' => 27,
                    'options' => ''
                ],
                [
                    'provider_id' => 'twitch',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Twitch',
                    'display_order' => 28,
                    'options' => ''
                ],
                [
                    'provider_id' => 'yandex',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Yandex',
                    'display_order' => 29,
                    'options' => ''
                ],
                [
                    'provider_id' => 'dropbox',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Dropbox',
                    'display_order' => 41,
                    'options' => ''
                ],
                [
                    'provider_id' => 'paypal',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Paypal',
                    'display_order' => 51,
                    'options' => ''
                ],
                [
                    'provider_id' => 'vimeo',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Vimeo',
                    'display_order' => 52,
                    'options' => ''
                ],
                [
                    'provider_id' => 'tumblr',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Tumblr',
                    'display_order' => 71,
                    'options' => ''
                ],
                [
                    'provider_id' => 'pinterest',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Pinterest',
                    'display_order' => 72,
                    'options' => ''
                ],
                [
                    'provider_id' => 'amazon',
                    'provider_class' => 'JUM\\ConnectedAccounts:Provider\\Amazon',
                    'display_order' => 73,
                    'options' => ''
                ]
Nice... If the developers add 1 of the services the same as in this list, then hello to the conflict. Developers provide an abstraction and addition of their types, but no. We will climb into the engine and we will expand, and there are so few additions that we expand many functions and we will use it.
PHP:
<?php

namespace JUM\ConnectedAccounts\XF\Criteria;

class User extends XFCP_User
{
    protected function _matchNotConnectedAccounts(array $data, \XF\Entity\User $user)
    {
        if (empty($data['provider_ids']))
        {
            return false;
        }
        foreach ($data['provider_ids'] AS $providerId)
        {
            if (!isset($user->Profile->connected_accounts[$providerId]))
            {
                return true;
            }
        }
        return false;
    }
}
Nice idea:
PHP:
/**
     * @param UriInterface|string $path
     * @param string $method
     * @param null $body
     * @param array $extraHeaders
     * @return string
     * @throws \OAuth\Common\Exception\Exception
     * @throws \OAuth\Common\Token\Exception\ExpiredTokenException
     */
    public function request($path, $method = 'GET', $body = null, array $extraHeaders = [])
    {
        $method = 'POST';
        return parent::request($path, $method, $body, $extraHeaders);
    }
Create a variable and leave it in memory.
 
@Jumuro it may be worth fixing the first issue so that your account providers have a JUM prefix as this ensures there won't be any conflicts in the future with any providers we add or those added by other add-ons.

This is alluded to in the resource standards. See point 25.

I don't have any particular issue with the other things.

When can you make this change?
 
Had some errors the other day:

Code:
ErrorException: [E_NOTICE] Undefined index: email src/addons/JUM/ConnectedAccounts/ConnectedAccount/ProviderData/Twitch.php:46

#0 src/addons/JUM/ConnectedAccounts/ConnectedAccount/ProviderData/Twitch.php(46): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/html/s...', 46, Array)
#1 src/XF/ConnectedAccount/ProviderData/AbstractProviderData.php(171): JUM\ConnectedAccounts\ConnectedAccount\ProviderData\Twitch->getEmail()
#2 src/XF/ConnectedAccount/ProviderData/AbstractProviderData.php(192): XF\ConnectedAccount\ProviderData\AbstractProviderData->offsetGet('email')
#3 src/XF/Pub/Controller/Register.php(358): XF\ConnectedAccount\ProviderData\AbstractProviderData->__get('email')
#4 src/XF/Pub/Controller/Register.php(299): XF\Pub\Controller\Register->setupConnectedRegistration(Array, Object(JUM\ConnectedAccounts\ConnectedAccount\ProviderData\Twitch))
#5 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Register->actionConnectedAccountRegister(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'ConnectedAccoun...', Object(XF\Mvc\RouteMatch), Object(BlackTea\SteamAuth\XF\Pub\Controller\Register), NULL)
#7 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(BlackTea\SteamAuth\XF\Pub\Controller\Register), NULL)
#8 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
 
I'm getting some issues when using the Twitch Connected Account. After a period of time, it will randomly disconnect the account and Ill have to manually go in a disassociate and then reassociate the account to get it connected again. Is there any way to fix this?
 
Seeing issues with Twitch as well in connected accounts, was working fine up to today, I'm guessing due to Twitch API changes, but I did a quick look over the php code and couldn't find anything wrong (My PHP dev days are long, long behind me, so I could have easily missed something). Every time now I just get prompted for forum password, then pop of "Please enter a value for the required field 'provider_key'.". I did double check client id/secrets were still in place and valid (even refreshed the secret).
 
Top Bottom