Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How can i add user's to Q2A Database in a external website

+5 votes
113 views
asked Mar 23, 2017 in Q2A Core by HatCliff
Hello ;)

i'm developing a website which is divided into 2 parts, the first part it's a external web section which is developed by me and the second part it's the Q2A section.

I want the database to share information with the web that I am developing (Specifically user information).

1) How can i add user's to Q2A table using a external web? (with the encryption)

2) How can i use the profile picture of Q2A section user's in the external web?
Q2A version: 1.7

1 Answer

+1 vote
answered Mar 23, 2017 by Scott
 
Best answer

Take a look at the "External Code" page of the docs which explains the basics. You can check if a user is logged in with qa_get_logged_in_userid()

For the avatar you'd need some PHP like:

$user = qa_get_logged_in_user_cache();
echo qa_get_user_avatar_html($user['flags'], $user['email'], $user['handle'], $user['avatarblobid'], $user['avatarwidth'], $user['avatarheight'], qa_opt('avatar_users_size'));

...