Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Synchronization of usernames
JoakimT
New
We use jsconnect and orchid to do SSO between Drupal and Vanilla. Our problem is that we have different usernames on either side. In Drupal members log in with their member id, always a 6 digit number. In Vanilla they can pick whatever forum username they want.
Our problem is that whenever you log in with SSO the usename in Vanilla is overwritten by the username in Drupal.
Any way to avoid this?
Running Vanilla 2.1.8 and jsconnect 1.4.4
0
Comments
I do not think this functionality comes out of the box in jsConnect. You should be able to do it by modifying Orchid to not pass the 'name' field.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thanks for the suggestion but i think orchid needs to pass the name field to match users.
Need to figure out why or how jsconnect updates the username in vanilla to match it.
If you want a quick fix.
In class.entrycontroller.php, look for this line
// Synchronize the user's data.
$UserModel->Save($Data, array('NoConfirmEmail' => TRUE, 'FixUnique' => TRUE, 'SaveRoles' => $SaveRoles));
And add this above it
This will populate the name if the name is empty, but will not overwrite it if the user has changed their name.
@dribbons Sorry, but whenever I see someone speaking about changing the core I have to stress that /!\ it is a bad idea /!\.
Please look at the following code for a small plugin and see if it can do what your code changes does. I do not understand why and what your code does since I'm not using jsConnect, but I would expect that the plugin prevents a change of the username
If this plugin is helpful for you, please consider extending the description and uploading it to the addon section.
Did anyone ever confirm that this works?
Never mind, it doesn't. Can't get the plugin to enable.
I'm an idiot. There's an extra 'i' in line 1 of the pasted code ( 'idefined()' instead of 'defined()').
Also, I just tested it out - logged in with G+ and it did not change my username! Thank you!
@hgtonight or @whu606
Could you please change the first line in my code above to be simply
<?php
? Thanks!