Jump to content

Restrict Registration Time


Padrio

Recommended Posts

Hi there,

because of stupid German laws, we need to restrict the ability to create a new account so you only can create one between 23 o'Clock and 6 o'Clock.
I have good PHP knowledge, but never created something for the IPBoard, so i need some help here, maybe links that may show me how the hooks are working.

The Plugin itself will be simple, get current \DateTime()-Object and lookup if the current time is between 06 and 23 o'Clock, if yes, do nothing. Otherwise show a message that the Registration-Process is currently not available.

Hope you understand my needs.

Kind Regards,
Padrio

Link to comment
Share on other sites

1.  You'll need a plugin  to override the register controller via a hook 
There you could override the manage method to run your time check and return an error ..

 

2. We have also a setting which enabled & disables registrations. You could create a plugin which implements  a task which would then change the \IPS\Settings::i()->allow_reg setting to true at 06:00 am and to false at 11pm

 

Link to comment
Share on other sites

besides me thinking such a law in Germany is dreadful I think there is definitley a market for some plugin to control registrations at certain times. Id like to let them register but get a notice to say "any registrations beween 11pm and 8am are held in moderation"  I would sleep better then ^_^

Link to comment
Share on other sites

34 minutes ago, Padrio said:

Hi there,

because of stupid German laws, we need to restrict the ability to create a new account so you only can create one between 23 o'Clock and 6 o'Clock.
I have good PHP knowledge, but never created something for the IPBoard, so i need some help here, maybe links that may show me how the hooks are working.

The Plugin itself will be simple, get current \DateTime()-Object and lookup if the current time is between 06 and 23 o'Clock, if yes, do nothing. Otherwise show a message that the Registration-Process is currently not available.

Hope you understand my needs.

Kind Regards,
Padrio

is this the server local time or the users local time?

Link to comment
Share on other sites

3 minutes ago, kar3n2 said:

besides me thinking such a law in Germany is dreadful I think there is definitley a market for some plugin to control registrations at certain times. Id like to let them register but get a notice to say "any registrations beween 11pm and 8am are held in moderation"  I would sleep better then ^_^

Could you then just enable the admin validation feature?

Link to comment
Share on other sites

Well, thanks for all your answers, they really help me a lot.
But, is there no way i can install a second IPBoard instance for development purposes? Since i only have one license, which is in production use, the following message show up:
"An installation has already been activated for this license key. Your license key entitles you to one installation only. If you need to change the URL associated with your license, contact IPS technical support."

Link to comment
Share on other sites

10 minutes ago, Padrio said:

Well, thanks for all your answers, they really help me a lot.
But, is there no way i can install a second IPBoard instance for development purposes? Since i only have one license, which is in production use, the following message show up:
"An installation has already been activated for this license key. Your license key entitles you to one installation only. If you need to change the URL associated with your license, contact IPS technical support."

You are allowed to run a test/development instance. Add -TESTINSTALL to the license key 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...