Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
1.2k views
in Q2A Core by
For example limit the registration to only email holders of @myDomain.com r.
Q2A version: 1.8
by
Just follow a similar approach to the one I mentioned in your previous question which, for some reason, you never replied back: http://www.question2answer.org/qa/59636?show=59642#a59642

1 Answer

+3 votes
by

Hi

I had a similar need as I installed Q2A on a website I developed on my workplace. I wanted my collegues to use their professionnal email adress (we just have one domain as to email), and it turned out to be quite simple

  1. I added a check with strpos to the class qa_filter_basic (plugins\qa-filter-basic.php) : strpos($email,'@yourdomain.ext')===false
  2. If the verification fails (the email does not belong to the specified domain), then return a message ("email_conseil_dep") saying only their professionnal mail is allowed. Message that I added - with a translation in French - to fr\qa-lang-users.php (you will have to do it in your specific folder)

This did the job for me. Hope it will be useful for someone out there

Kind regards

Paul V
France


 

by
Hi Paul....
Many Many Thanks. This is Working. This will help to Stop spammy user registration.
by
It probably won't help as much as you hope it would. A lot of the spammer registrations on my site use Gmail or Yahoo addresses.
Also, instead of modifying core code (which is discouraged b/c the modifications need to be re-applied after every update), you could use my plugin Registration Blocker (https://github.com/ansgarwiechers/q2a-registration-blocker ), which has an option to whitelist allowed mail domains (and block everything else).</shameless plug>
by
edited by
For me it will perfectly do the job, as my use of Q2A is limited to an internal network (we have a lot a tools at the entrance of our network)
And adding my core modifications to un update will take me 3 seconds
But thanks anyway for your comment
And thanks for picking up development of the registration-tool
...