We've been having issues on www.pri.org where anonymous users that attempt to log into a story through the comments interface are also NOT logged into Drupal. We require that all users must be logged into comment.

I noticed that in your documentation that this is the intended workflow (https://drupal.org/node/538106):
"Also notice that if you enable the “login existing user” option under the “social login”/”login behavior” setting guest users will be able to authenticate through a social network using Gigya, while not logging-in to your site. Therefore, as far as your site is concerned, these comments will be posted by logged-out users (that are authenticated by Gigya). The module is designed to allow these comments to be posted to the site, even if your site is configured not to allow anonymous comments. If you wish your users to always login before posting comments, choose the “always login” setting.”

I've just updated the module to 7.4.4 on our staging site and added in the following parameters in the comments tab under Advanced Settings (as suggested by documentation):
alwaysLogin|true
useSiteLogin|true

However, users that are NOT authenticated with a Social Network are also not shown to be logged in after authenticating with a social network (upload.png). Am I missing a parameter here?

Thank you,
-Brandon

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrandonHundt’s picture

Issue summary: View changes
FileSize
120 KB
Gigya’s picture

Category: Bug report » Support request

Hi Brandon,

First, I have seen that you have implemented RaaS.

In RaaS parameters such as "alwaysLogin" are set via accounts.setPolicies method.
"alwaysLogin" is the default value in RaaS, so there is no need to set it.

Second, regarding "useSiteLogin" in comments, please refer to the following guide:
http://developers.gigya.com/010_Developer_Guide/18_Plugins/022_Comments_...
It is not enough to pass the parameter, you need to implement the event.

Please contact your Gigya's Implementation Manager for further support.

BrandonHundt’s picture

Thanks. Since all of the parameters mentioned in the documentation are set through the module, shouldn't this be able to be set through the module as well?

I went to the Comments tab and attempted to add onSiteLoginClicked|onSiteLoginHandler but there was a json error. (see attached, upload2).

BrandonHundt’s picture

I should add, that the documentation is clear on how to make this happen as if I were implementing this on a site without using this module, but it doesn't give me the detail necessary to make this happen using Drupal to override the module code. Where should I add the event with the additional parameters? Thanks.

gambaweb’s picture

To add site login to your comments plugin in your Drupal site:

Add useSiteLogin|true to the "Advanced showCommentsUI settings" in the Gigya comments configuration section in your Drupal site.

You would need to implement an event handler method that would show the site login screen.
Since you have implemented RaaS in your site, I am guessing that you would like to pop-up the RaaS login screen.
In that case your event handler method should look something like that:

Drupal.yourModuleName.functionName = function (data) {
      gigya.accounts.showScreenSet(Drupal.settings.gigya.raas.login);
}

Now you'll need to register the method with the comments plugin's event, to do this you would need to add a line to the Gigya Drupal module (This is since you can't pass a method reference through the Drupal configuration).
In the gigya_comments.js file add to line 29:

Drupal.settings.gigyaComments.commentsUIparams.onSiteLoginClicked = Drupal.yourModuleName.functionName;

BrandonHundt’s picture

Thank you @gambaweb! That did the trick. I appreciate the help.

gambaweb’s picture

Status: Active » Closed (fixed)