Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How to limit working hours for any access level?

Questions related to using nuBuilder Forte.
Post Reply
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

How to limit working hours for any access level?

Unread post by miasoft »

Users are ready to work around the clock. I would like to have my own time to modify the server and database. I would like to limit their work, for example, from 08:00-20:00 . How is it easier to do this?
Wbr, miasoft.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: How to limit working hours for any access level?

Unread post by kev1n »

Hi,

Add a new Procedure with a global nuBeforeEdit event:

Code: Select all

if (nuGlobalAccess()) return;

$d = date('H');

if ($d < 8 || $d > 20) {
    nuDie('The system is down for maintenance from 20:00 - 08:00');
}
You do not have the required permissions to view the files attached to this post.
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: How to limit working hours for any access level?

Unread post by miasoft »

Thanks! That's great! :)
Wbr, miasoft.
Post Reply