XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Hi there is a problem with users using this discord integration to create/log into the forum account. It creates an account in the DB but it does not pass on the e-mail or password (which may be encrypted differently). Thus users are not able to use other software that checks against the user forum credentials. They are also unable to reset their pass when registering with discord: they never get the reset pass e-mail

Is there a way to disable user registration for certain usergroups or altogether while still keeping the discord widget.
 
Hi there is a problem with users using this discord integration to create/log into the forum account. It creates an account in the DB but it does not pass on the e-mail or password (which may be encrypted differently). Thus users are not able to use other software that checks against the user forum credentials. They are also unable to reset their pass when registering with discord: they never get the reset pass e-mail

Is there a way to disable user registration for certain usergroups or altogether while still keeping the discord widget.
Thats not how single sign on works... When you create an account using a connected account, it will NOT set a password for the account you just created. Discord will not send the user's Discord password to XenForo; that would violate every security procedure. In fact, a good database, doesn't even store passwords. This is by design, and this is how ALL connect accounts work.

Until a user sets their own password, the account won't have a password and the user will only be able to log on using the connected account. This is how ALL connected accounts work; even the ones built into XenForo like Google, Facebook and Twitter.
 
Hello! Continuing to enjoy this integration, however...

Upgraded to 2.0.2.2 just fine, but trying to get to 2.1.1.3 gives me the following:

InvalidArgumentException: xf_user_option: Column definition 'discord_options' does not exist therefore it cannot be changed. in src/XF/Db/Schema/Column.php at line 415
  1. XF\Db\Schema\Column->getDefinition() in src/XF/Db/Schema/Alter.php at line 230
  2. XF\Db\Schema\Alter->getQueries() in src/XF/Db/Schema/AbstractDdl.php at line 147
  3. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 149
  4. XF\Db\SchemaManager->alterTable() in src/addons/EWR/Discord/Setup.php at line 83
  5. EWR\Discord\Setup->upgrade2110Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 122
  6. EWR\Discord\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 71
  7. EWR\Discord\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 575
  8. XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 321
  9. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  10. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  13. XF\App->run() in src/XF.php at line 390
  14. XF::runApp() in admin.php at line 13

Thoughts? Do i need to create a column somewhere in the db? I'm on XF 2.1

Edit: Answering my own question, I added discord_options as a column to xf_user_option in the database and the upgrade took care of the rest. Works fine now.
 
Last edited:
Small heads-up for everyone. If you previously set usergroup promotion associated with discord connected account, and upgraded the add-on to the latest version, the usergroup promotion connected account of discord switches to "0".

You'll have to change it back to discord. Not sure if this was known already though.
 
Can someone check if the D->XF sync is working on the latest version? It syncs up the forum roles back to discord just fine (XF->D). But I no longer see discord roles syncing back to the users on the forums.
 
@Jaxel

Suddenly the link for invite stopped working at my site and it just sends to the current page instead.

https://vocaverse.network/discord/

Phrase is currently:

Code:
<a href="{invite}">JOIN</a>

It just stopped working, no errors, no explanations, no modifications were done after it was setup.

Everything else of the plugin works.

Also another question, how can I modify where the Discord widget appears? Cannot seem to find it under Widgets.
Did this ever get responded too? It's currently happening to me atm and my members are complaining. I was trying to customise the page to look nicer.... I've tried reverting everything and still no dice. Help! @Jaxel
 
I'm rather curious what other people think about this feature, so I shall post it here as well (Also did it on Jaxel's discord. Hopefully he'll agree creating this feature).

However, if an account was changed on DISCORD; there was no way for XenForo to know about the changes; until the next time the account came up in the sync queue. This of course meant an account would have to wait up to 24 hours (or even more if your forum had more than 288 synced accounts on it) before the next time it cycled into the sync queue.

and:

However, if the account was NOT a member of of the Discord server, XenForo would have no account to sync to. Then of course, when the user would join the server after the fact, there is no way for XenForo to know the account is now available to sync

Both of these sync queue that can take up a lot of time (days, even.. Depending on the amount of users) can easily be solved with some kind of bridge script running between the forums and discord.. Like a bot. This also means that the bot that is used in the discord forum settings can stay online 24/7. Every user role change that it detects in the audit logs can then be instantly checked on the forums if the user already has it and apply it if needed. Even those who are not a discord/linked user, a backlog can be created for it to check later on if it needs syncing.

Which made me thinking. I have no idea how the current integration between the forums and discord works, seeing there is already a bridge/connection between the 2. How come it won't regularly check the audit logs for the user role changes?

If these role checks for almost instant changes are only possible for a constant online system running locally or on a remote machine, I don't mind. It would be great having such option/feature in place for those who can use it.

The only reason why I'm asking about this is because some discord roles (such as Booster role) are important for me to have synced up on the users profiles on the forums as soon as possible.
 
I will not write a bot that runs on people's servers.
Technically the add-on already acts as a bot and thus is already running on people's servers.. But any specific reason as to why not? It would only act as a live sync push to forward the discord information to the forums which will eradicate the sync delay.

I mean.. 24 hours over 288 synced accounts. Sum that up for large boards, like 10x as much.. 2,880 forum members equals to 240 hours (10 days!)

You haven't even considered the people who are running large boards?
 
Last edited:
No, it's not a bot. Nothing is actively running on your server. And the system can process 1440 accounts a day now.
 
I was merely referring to discord's application that was setup to be used by the add-on.

And the system can process 1440 accounts a day now.

If that's the case, please do tell me why it takes multiple days for it to sync over.

There are a total of 612 members on my discord server that have their accounts linked with the forums. So it all should take about 12 hours to sync over.

1582155619406.png

I removed these roles from my alt account, and waited for them to sink over. Which I did on a Saturday (Feb, 15) at 9:45AM.

1582155710736.png

Changes were made on the forums on Feb, 17 at 4:37PM. So in total, it took the system 2 days, 6 hours and 52 minutes to kick in.

Example 2:

1582156010878.png

And:

1582156047523.png

Added the roles on their discord account, on Feb 18 at 2:09PM and 4:44PM. It's now 20th Dec, 12:48AM. The roles has not synced up to the forums on their accounts yet. So that's currently taking over a day now.

Wouldn't it be much easier to deal with this problem by adding some kind of live role checker? Making queues (D->XF) (almost) non-existent because it'll only make the changes if people's roles have actually changed. Also easier on the cron-task, so it doesn't require minutes to finish it up.

I'm not even saying to replace the existing sync system. Just as an optional feature for large discord servers.
 
Last edited:
Because XenForo cronjobs are only run when people are on your website. It CAN run up to 1440 a day... if the cronjobs are activated.
 
Even with CLI Job Runner? (I've been using it for a long time now)

I'm not trying/wanting to be annoying btw. But with these current "limitations" so to speak, it makes D->XF a bit pointless on larger boards because it appears to depending on a lot of criterias if which may take ages for people to gain their forum roles from discord. Unless some kind of live check is in place.

I'm just not sure why you refuse to implement it when the option is out there. I really don't see the harm in it as it would really enhance the add-on as a whole. And again, I assume it would eliminate the cron job taking 3 to 4+ minutes as well to finish up.
 
Last edited:
Top Bottom