Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
433 views
in Plugins by
Hello,

I want to limit the number of users to 50 users. Is there an easy way to set this number?

Many thanks!
Q2A version: 1.7

1 Answer

+1 vote
by
selected by
 
Best answer
Came here to answer my own question...

In qa-include/pages/register.php, I add the following code towards the start.

// limit the number of register users to 50 users.    
    $number_of_reg_users = qa_opt('cache_userpointscount');
    if ($number_of_reg_users > 50) {
        $qa_content = qa_content_prepare();
        $qa_content['error'] = qa_lang_html('too many users');
        return $qa_content;
    }

If you see something wrong, please let me know. Thank you!
...