1
limecity
Block Registration after X hour
  • 2007/4/29 16:07

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Is there anyway to set an automation where the registration will be block from let say 12am to 6am ?

that is the time I go sleep and all the spammers crawl out of their nest and register in the site. flooding the forum with their nokia n95 ads. Giving me a heartattack when I wake up and check on the site.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
JMorris
Re: Block Registration after X hour
  • 2007/4/29 16:40

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


/register.php lines 268-269:

Change
include 'include/registerform.php';
    
$reg_form->display();


To
if (date('H') > "20" || date('H') < "08"){
    echo(
'Site registration is closed between the hours of 20:00-08:00. Please come back later');
    }else{
    include 
'include/registerform.php';
    
$reg_form->display();
    }


Something like this should do the trick for you. Just remember to document the change for when you upgrade in the future.

HTH.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
limecity
Re: Block Registration after X hour
  • 2007/4/29 19:01

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Thanks James for the quick reply.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


Login

Who's Online

330 user(s) are online (261 user(s) are browsing Support Forums)


Members: 0


Guests: 330


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits