Hi Alok
You will have to add some verifications in the file qa-filter-basic.php (you can find it in folder qa-include\plugins)
You can (must) insert these verifications in the class qa_filter_basic, more specifically, inside the function filter_email
I had only one domain, so for me that was rather simple. You have four domains, so you will have to combine all four domains in one single condition, and if all 4 checks are false, that means that the new user does not have one of the 4 email adresses you would like to pass.
On the contrary, if he or she has a (for exemple) @gmail.com adress, one of the four checks will return a number (the start position of the string in the email adress), and a number is something different than false, so one of the four checks is not false, thus the entire test is invalid (dont't forget that you're working with the logical operator AND)
so, in your case, the four-fold check would be :
if(strpos($email,'@gmail.com')===false and strpos($email,'@yahoo.com')===false and strpos($email,'@outlook.com')===false and strpos($email,'@hotmail.com')===false){
return qa_lang('users/your_refusal_message');
}
You will then have to add "your_refusal_message" (or whatever code you want to use), and its translation (if you're working in another language than english) in the language-translation file of your Questions2Answers installation, so that the internal Questions2Answers function called qa_lang can use your argument "your_refusal_message".
I have a french installation so my french language file(qa-lang-users.php) is located in qa_lang\fr
You will have to find your own (sorry, I can't help you there), and insert your_refusal_message somewhere in the array with all the codes and their translations
This is the line I added somewhere in the middle
'email_conseil_dep' => 'Seulement votre adresse mail professionelle',
which means (in my case) that if someone want to subscribe with an email adress that does not contain our company's domain name, he or she will be reminded that only a professionnal email adress of our company can be used, and the submission of the form will fail.
Hope this is explicit enough
Kind greetings
Paul