Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
in Q2A Core by
I have just set up my own instance of a Question 2 answer website but I'm struggling with the login aspect.

I only want specific email addresses to have the ability to login so anyone that is not on the list of addresses I have is told they can't log in, I have not made the site with the ability for single sign on as I attempted that already to no avail.

So far I have been unable to find anywhere in the admin section that allows me to white list specific e-mails or user ids so I was hoping there is a simple way of doing this? Whether it be in the DB, editing the code or in the admin section, any help would be much appreciated.
Q2A version: Latest

2 Answers

+1 vote
by
first create all required users and the close site with below kind of plugin or using admin->viewing options.

https://github.com/JackSiro/Q2A-Closed-Site-Plugin
by
Are you guys planning to develop any invite users plugin that lets existing users invite another user?

That will go well with q2a-closed-site plugin.
+2 votes
by
One option is to enable approval of users (in Admin > Spam page). Also tick "all new users must be approved". Then you can deny all requests except the emails you want.

Besides that, the best solution would be a filter plugin: http://docs.question2answer.org/plugins/modules-filter/

Use the filter_email function, and if the email is not on your whitelist return an error message.
by
@scott, is it possible for you to add private site feature in q2a, once enabled then it should show only login page. I do see may people are looking for this. thanks
by
Can't you set that in the permissions? Set "viewing question pages" to "registered users".
by
@scott, after setting that it still shows question. when clicked it asks for login. for private site only registered users should be able to see question, access to questions, answer ,images should be blocked once site is private.
by
Oh OK I get it. Yeah it's probably worth adding a new permission for "viewing any pages".
...