Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
501 views
in Q2A Core by

I understand that this question has been asked plenty of times here and the answer is usually something like "create a filter_handle plugin".

Can someone give me a step-by-step guide on how to do such a thing.
I want usernames to be restricted to alphabets, numbers & underscores.

Q2A version: 1.7.2

1 Answer

0 votes
by
You can refer to this plugin - https://github.com/amiyasahu/q2a-registration-blocker

In this method - https://github.com/amiyasahu/q2a-registration-blocker/blob/master/qa-registration-blocker.php#L95

you need check for the $handle variable if it contains the extra characters using strpos .
...