Codoforum related discussions
HELP!! Need help with SSO plugin with wordpress.

I got SSO working!!! However, it doesn't seem to fetch my avatar. smile

Here is my client.php file...

<?php

/**

  • You do not have to edit sso.php file
  • This file/code should get executed when Codoforum sends a request
  • to the path <SSO Get User Path> as defined in SSO plugin settings
  • in Codoforum backend
  • */

require 'sso.php';

/**

  • The SSO client id and secret MUST be same as that set in the Codoforum
  • SSO plugin settings
    */
    $settings = array(

    "client_id" => 'removedforsecuritypurposes',
    "secret" => 'removedforsecuritypurposes',
    "timeout" => 6000
    );

$sso = new codoforum_sso($settings);

$account = array();

/**

  • Here comes your logic to check if the user is logged in or not.
  • A simple example would be using PHP SESSION
    */
    if (USER_IS_LOGGED_IN) {

    $account['uid'] = USERID; //Your logged in user's userid
    $account['name'] = USERNAME; //Your logged in user's username
    $account['mail'] = EMAILID; //Your logged in user's email id
    $account['avatar'] = ''; //not used as of now
    }

$sso->output_jsonp($account); //output above as JSON back to Codoforum
exit();

I got SSO working!!! However, it doesn&#039;t seem to fetch my avatar. :( Here is my client.php file... &amp;gt; &amp;lt;?php /** * * You do not have to edit sso.php file * * This file/code should get executed when Codoforum sends a request * to the path &amp;lt;SSO Get User Path&amp;gt; as defined in SSO plugin settings * in Codoforum backend * * */ require &#039;sso.php&#039;; /** * * The SSO client id and secret MUST be same as that set in the Codoforum * SSO plugin settings */ $settings = array( &quot;client_id&quot; =&amp;gt; &#039;**removedforsecuritypurposes**&#039;, &quot;secret&quot; =&amp;gt; &#039;**removedforsecuritypurposes**&#039;, &quot;timeout&quot; =&amp;gt; 6000 ); $sso = new codoforum_sso($settings); $account = array(); /** * * Here comes your logic to check if the user is logged in or not. * A simple example would be using PHP SESSION */ if (USER_IS_LOGGED_IN) { $account[&#039;uid&#039;] = USERID; //Your logged in user&#039;s userid $account[&#039;name&#039;] = USERNAME; //Your logged in user&#039;s username $account[&#039;mail&#039;] = EMAILID; //Your logged in user&#039;s email id $account[&#039;avatar&#039;] = &#039;&#039;; //not used as of now } $sso-&amp;gt;output_jsonp($account); //output above as JSON back to Codoforum exit();
edited Sep 2 '15 at 8:22 am

Hi,

Yes, we have not yet integrated avatars.

It is not that difficult, we will update the code to make the avatars work in the next version.

Hi, Yes, we have not yet integrated avatars. It is not that difficult, we will update the code to make the avatars work in the next version.

I'll hold you down to it. smile

LOVING how the forum software works. It's so modern and nice.

I think the biggest requested feature I have is for new articles from my wordpress site to post over to a forum board (chose what forum it posts to per article published on wordpress). That would make codoforum 10/10 software.

I&#039;ll hold you down to it. :D LOVING how the forum software works. It&#039;s so modern and nice. I think the biggest requested feature I have is for new articles from my wordpress site to post over to a forum board (chose what forum it posts to per article published on wordpress). That would make codoforum 10/10 software.
261
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft