Make Email Address Mandatory

identicon
Make Email Address Mandatory
345c3d26 Tuesday 14th August 2018, 20:53:45

Was wondering how I would make inputting your email address mandatory when posting?  I've looked over all the posts on this forum with no luck and also in my admin>>config but nothing there either.  Is this possible?

Replies 11
Fred_4346f29d
Fred  Sunday 25th November 2018, 10:20:17

No plugin require, just edit add.php file and search in:
if(Util::isGETValidEntry('forum', 'topic'))
For add a topic, replace:
if(HTMLForm::checkBot() && HTMLForm::check('trip', 0, 20) && HTMLForm::check('title', 5, 80) && HTMLForm::check('content', 1, 4000) && CSRF::check($token) )

by:
if(HTMLForm::checkBot() && HTMLForm::checkMail($_POST['mail']) && HTMLForm::check('trip', 0, 20) && HTMLForm::check('title', 5, 80) && HTMLForm::check('content', 1, 4000) && CSRF::check($token) )

For add a reply, seach in:
if(Util::isGETValidEntry('topic', 'reply'))
replace:
if(HTMLForm::checkBot() && HTMLForm::check('trip', 0, 20) && HTMLForm::check('content', 1, 4000) && CSRF::check($token) && $error=='' )

by:
if(HTMLForm::checkBot() && HTMLForm::checkMail($_POST['mail']) && HTMLForm::check('trip', 0, 20) && HTMLForm::check('content', 1, 4000) && CSRF::check($token) && $error=='' )

Save add.php file and is done.

Before ask a question, read the documentation.
Please like in alternativeto.net 👍🏻
╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!

Prétendre que votre droit à une sphère privée n'est pas important parce que vous n'avez rien à cacher n'est rien d'autre que dire que la liberté d'expression n'est pas essentielle car vous n'avez rien à dire.
-- E. Snowden

Fred_4346f29d
Fred  Sunday 25th November 2018, 10:22:06

  No need to ban it is just an IP VPN smile

Last modified: Sunday 25th November 2018, 10:23:38

Before ask a question, read the documentation.
Please like in alternativeto.net 👍🏻
╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!

Prétendre que votre droit à une sphère privée n'est pas important parce que vous n'avez rien à cacher n'est rien d'autre que dire que la liberté d'expression n'est pas essentielle car vous n'avez rien à dire.
-- E. Snowden

identicon
104ca5c7  Friday 8th March 2019, 21:31:04

 
Awesome, thanks Fred!

Suggested Topics
identicon
bb4d0 started Events?
685 9
identicon
cpcnw@f70467eb started Testing 123
Open Bar
273 0
Want to read more? Browse all categories or view latest topics.