jsConnect Not Syncing Roles
I am using an Embedded Vanilla Forum and passing in a SSO token. I have included the following in the json:
"roles": "Member,Moderator"
But only the member role is assigned to the user. Is there something else that needs to be done to enable the roles to be synced via this SSO Token?
0
Answers
Bump. Any update? Did you figure it out?
Have you added
to your config?
Alright, to continue this thread: I've edited the config, added roles to my JSONP response and still don't have it working. It DOES modify the roles, however. No matter what I do, it removes all roles and assigns just "Member". Any clue why?
I'm having the same problem... no matter i tries.... nothing works... I get registered with "Member" role only.
I added to config:
I have added to sso:
$data = array( "uniqueid" => $user->id, "email" => $user->mail, "name" => $user->profile->name, "photourl" => $user->profile->getPhotoThumbnail(), "roles" => "myNewRole", "uniqueid" => $user->id, );Nothing works... any clue?
Have you made the connection "trusted" in the connection settings page?
There was a typo.
$Configuration['Garden']['SSO']['SynchRoles'] = TRUE;
Should be
$Configuration['Garden']['SSO']['SyncRoles'] = TRUE;
sync or synch is a correct spelling. just variants of one another.
But only the config statement with the "h" is the one used in the code afaik.
vanilla 2.2.1
https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/applications/dashboard/settings/structure.php#L263
master
https://github.com/vanilla/vanilla/blob/4c6beb316750e247045741c41bc0a7d43ac22dee/applications/dashboard/settings/structure.php#L271
as far as I can tell the config statement is still
as Bleistivt stated above https://vanillaforums.org/discussion/comment/222475/#Comment_222475
based on the code
// Fix the sync roles config spelling mistake. if (c('Garden.SSO.SynchRoles')) { saveToConfig( array('Garden.SSO.SynchRoles' => '', 'Garden.SSO.SyncRoles' => c('Garden.SSO.SynchRoles')), '', array('RemoveEmpty' => true) ); }and the word can be spelled either way in english.
But the config statement needs to match what it expects $Configuration['Garden']['SSO']['SynchRoles'] and it expects it with the "h"
http://www.dictionary.com/browse/synch
http://www.merriam-webster.com/dictionary/sync
unless you mean something else regarding the code.