Loginshare - How to test?

Discussion in 'Developing, APIs and extending' started by jeffshead, Jul 28, 2012.

  1. jeffshead

    jeffshead Established Member

    I've been trying to determine why I cannot get a loginshare script to work so I created a test page named 'login.php' and put the following in it...

    Code:
    <?php
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\r";
    echo "<loginshare>\n\r";
    echo "\t<result>1</result>\n\r";
    echo "\t<user>\n\r";
            echo "\t\t<usergroup>Registered</usergroup>\n\r";
            echo "\t\t<fullname>John Doe</fullname>\n\r";
            echo "\t\t<designation>Customer</designation>\n\r";
            echo "\t\t<emails>\n\r";
            echo "\t\t\t<email>johndoe@mysite.com</email>\n\r";
            echo "\t\t</emails>\n\r";
            echo "\t\t<phone>555-555-5555</phone>\n\r";
            echo "\t</user>\n\r";
    echo "</loginshare>";
    ?>
    ... and made sure LoginShare was turned on and pointed to 'login.php' in the Fusion admin. Shouldn't that allow me to login if I use the same credentials?

    All I get on the Fusion login page is "Invalid email or password" whether I use the code above or the actual loginshare script. I don't get any errors.

    The xml output from the script is correct and there does not appear to be any extra white space. I really think the issue is with Fusion.

    How can I troubleshoot?
     
  2. jeffshead

    jeffshead Established Member

    An experienced programmer just wrote a new loginshare script to use with Kayako. I have the same issue with his script. He said it appears to be an issue with Kayako because he verified the returned XML is correct according to Kayako's specifications.

    No errors are being logged even when I perform the test described here: http://dev.kayako.com/browse/SWIFT-1067 and I already tried this: http://dev.kayako.com/browse/SWIFT-2628

    Can someone please tell me how to troubleshoot? :(
     
  3. jeffshead

    jeffshead Established Member

    This was the problem:
    [​IMG]

    I knew you had to enable LoginShare in Admin CP -> Templates ->Groups but every time I went there to check the settings, there were no templates to inspect because the word "search" was in the search box. I never noticed this. That filtered all results so the Default template was never visible. I mistakenly assumed since I never created a template, there wasn't one. I didn't realize there should be a Default template there.

    Once I figured out what the problem was, I removed that word from the search box and of course the Default template was made visible.
    [​IMG]
    I enabled LoginShare in the default template and now it's working. Hooray!!!!
     

Share This Page