Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
427 views
in Q2A Core by

I'm trying to use Q2A in my startup company without the need to login. I want Q2A to try to login automaticly using my windows logged on user.

I have my instance of Q2A installed and I get the current user by using

$_SERVER['AUTH_USER'];

Now I want that if a user enters the Q2A site for the first time - It will try to connect him immidiatly using only his username.

I can't find where to alter ther login sequence on Q2A code.

1 Answer

+1 vote
by

You'll want to use Single Sign On - follow the instructions here: http://www.question2answer.org/single-sign-on.php

For example in your qa_get_logged_in_user function from qa-external-users.php you probably want to return an array like

return array(
    'userid' =>$_SERVER['AUTH_USER'],
    'publicusername' =>$_SERVER['AUTH_USER'],
    'email' => '', // add appropriate email here if you have one
    'level' =>'QA_USER_LEVEL_BASIC',
);
...