MyBB Community Forums

Full Version: Enhanced Account Switcher Usergroup Name Format Removal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having some issues with the Enhanced Account Switcher's usergroup name styles.

I've recently just purchased a plugin to change a users usergroup from the Mod CP, the plugin functions and works WONDERFULLY but the account switcher does not recognize the name style change. So it displays in the account switcher drop down as if that account was still in X group when it's now in XX group.

I can't honestly think of a good way to fix this without having some good portion of rewriting the plugin, so instead.. would it be possible to just have names in the account switcher part look like normal links? Instead of using the usergroups name style?

OR if it is possible to fix the above issue, without some crazy hard stuff, can someone point out how?
The account switcher cache isn't updated, because your plugin changes the usergroup in Mod CP.
It should work, if you add this hook to update the cache in inc/plugins/accountswitcher.php find (line 106):
// Add the hooks for updating the cache

and add below:
$plugins->add_hook('modcp_start', 'accountswitcher_pm');
Has anyone ever told you you're brilliant?

Lol, thank you! It worked. Smile
(2017-02-10, 09:08 PM)doylecc Wrote: [ -> ]The account switcher cache isn't updated, because your plugin changes the usergroup in Mod CP.
It should work, if you add this hook to update the cache in inc/plugins/accountswitcher.php find (line 106):
// Add the hooks for updating the cache

and add below:
$plugins->add_hook('modcp_start', 'accountswitcher_pm');


doylecc would I need to do the same thing for Group Memberships in the usercp? They do not seem to be caching correctly either though I'm not particularly sure what hook I would need to add.
If you mean users switching their usergroup by joining/leaving in user cp, then you could use the "usercp_usergroups_start" hook for updating the cache.