Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
729 views
in Q2A Core by
Hi,

There are two more issues that I am having trouble with in my deployment of QA. I think these are unrelated to the fact that I am using SSO with SMF. They are:

(1) When I click the Users tab, everything is fine, and I can see the list of users with points next to their usernames. Now, when I click on any of these usernames, I get the details for that username, but there is also an error at the top which says:

Notice: Undefined variable: handle in qa/qa-include/qa-page-user.php on line 141

When I am logged into QA, and click on my username at the top right hand corner to get my details, I get the same error as well, in addition to displaying my details.

Line 141 of qa-page-user.php is:

    $usershtml[$userid]=qa_html($handle);

When I changed this to:

        if (!QA_EXTERNAL_USERS) $usershtml[$userid]=qa_html($handle);

I don't get the error anymore. Am I right in including this if statement, or is there an issue somewhere else?

(2) When I click the Users tab, and click on a particular user to view details of the user, under Recently Answered Questions by this user, I can correctly see the list of questions answered by this user. However, below the title of the question, it says "answered 2 hours ago by anonymous" instead of saying "answered 2 hours ago by username". The same issue is also under Recently Asked Questions, where next to a particular question, instead of displaying the username, it says anonymous.

As always, appreciate any pointers. Thanks.

1 Answer

0 votes
by
edited by
 
Best answer
Both of these are reflections of the same bug, which has already been fixed in beta 3. The correct code for line 141 is below. This will work whatever the value of QA_EXTERNAL_USERS:

$usershtml[$userid]=$userhtml

Also I'd like to thank you for persevering with this. As you can probably tell, the external user integration code had been less thoroughly tested than the rest of the code base, and you've helped highlight a few issues.
...