Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.5k views
in Q2A Core by
closed by
Hello!

I've setup my external users file and it seems to be working ok so far but it's not propagating the screen name from my user database, the default is to use the users email address.

I'm getting the value from a custom query from my database using the cookie, here's what I'm returning to Question 2 Answer:

            if (is_array($result))
                return array(
                    'userid' => $result['member_id'],
                    'publicusername' => $result['screen_name'],
                    'email' => $result['email'],
                    'level' => $result['m_field_id_33'] ? QA_USER_LEVEL_ADMIN : QA_USER_LEVEL_BASIC
                );

The weird thing is that I've seen it work for some users, where they post a question and the screen name is used, but for the first questions that were posted it's still using the email address rather than the screen name... weird.

I still don't have my head wrapped around how Q2A pulls the user info using external user setup yet, I guess it's a live query?  I know that the member ID is stored in the Q2A database, but I've not seen any settings in the admin to choose to display the screen name or email as the public name..
Q2A version: 1.6.3
closed with the note: Figured it out!
...