Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import logged in user disqus comments

I have set up an openid logging in system for mysite and the famous disqus commenting system.

How can I integrate these both, i.e. retrieve the logged in user information in the disqus commenting system preventing the users to enter their details twice on the same site else whats use of simplifying the logging in task.

Is there any api for disqus so that I can autofill the user info automatically?

Something like this is the django_template:

{%if requet.user.is_active %}
  <!--Check if any user is logged in and if someone is then add this in the html output:-->
  var disqus_email = {{ user.email }};
  var disqus_name = {{ user.username }};
  <!--Or as in my case if active user have an openid-->
  var disqus_openid = {{ user.openid }};
{% endif %}

There is one simmilar post for this: Disqus and retrieving logged in user but looking at the response I decided to start a new question for my problem.

like image 283
crodjer Avatar asked Nov 14 '10 12:11

crodjer


1 Answers

Found out the solution at http://help.disqus.com/entries/100880-configure-and-override-comment-system-behaviors.
Had to define the following for current logged in user as I already thought of in the question:

var disqus_def_name = "{{ user.get_full_name}}";
var disqus_def_email = "{{ user.email }}";
like image 59
crodjer Avatar answered Sep 21 '22 19:09

crodjer