[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Unofficial UNIT-e Forum • Database Manager Users - Valid From and To Dates One Day Out
Page 1 of 1

Database Manager Users - Valid From and To Dates One Day Out

Posted: Tue Nov 08, 2016 8:46 pm
by robinwilson16
We have noticed that the logic for allowing people to log in is not quite right as when someone leaves the organisation, if we put the correct valid to date in then the system won't allow them to log in on their last day before they leave.

If someone leaves on 08/11/2016 then the valid to date should be that date as the account should be "valid" on that date. However it stops working at the end of 07/11/2016. :think:

The same problem occurs with the valid from date.

With this example the account would not be valid on 02/12/2015:
Database Manager Users.png
Database Manager Users.png (105.67 KiB) Viewed 1591 times

Re: Database Manager Users - Valid From and To Dates One Day Out

Posted: Fri Nov 18, 2016 9:28 am
by senev777
I think this is because Unite stores the date as 2015-12-02 00:00:000, which is basically end of 2015-12-01.

Re: Database Manager Users - Valid From and To Dates One Day Out

Posted: Sun Nov 20, 2016 2:20 pm
by robinwilson16
Thanks Chaminda

I see, that would make sense so in order to fix it they just need to cast the DATETIME value to a DATE to fix it probably so only the time part would be compared:

Code: Select all

CAST ( '2015-12-02 00:00:000' AS DATE )
Hopefully it will be an easy bug for them to fix.