[Jaws-commits] r13365 - branches/0.8/html/include/Jaws

afz at jaws-project.com afz at jaws-project.com
Fri Aug 10 15:28:10 UTC 2012


Author: afz
Date: 2012-08-10 15:28:10 +0000 (Fri, 10 Aug 2012)
New Revision: 13365

Modified:
   branches/0.8/html/include/Jaws/Session.php
   branches/0.8/html/include/Jaws/User.php
Log:
using default timezone for checking logon hours instead of user/cookie timezone

Modified: branches/0.8/html/include/Jaws/Session.php
===================================================================
--- branches/0.8/html/include/Jaws/Session.php	2012-08-10 15:25:38 UTC (rev 13364)
+++ branches/0.8/html/include/Jaws/Session.php	2012-08-10 15:28:10 UTC (rev 13365)
@@ -255,11 +255,11 @@
             // logon hours
             $logon_hours = $this->GetAttribute('logon_hours');
             if (!empty($logon_hours)) {
-                $wdhour = explode(',', $GLOBALS['app']->UTC2UserTime(time(), 'w,G'));
+                $wdhour = explode(',', $GLOBALS['app']->UTC2UserTime(time(), 'w,G', true));
                 $lhByte = hexdec($logon_hours{$wdhour[0]*6 + floor($wdhour[1]/4)});
                 if ((pow(2, fmod($wdhour[1], 4)) & $lhByte) == 0) {
-                    //$GLOBALS['app']->Session->Logout();
-                    //Jaws_Error::Fatal('Logon hours terminated');
+                    $GLOBALS['app']->Session->Logout();
+                    Jaws_Error::Fatal('Logon hours terminated');
                 }
             }
 

Modified: branches/0.8/html/include/Jaws/User.php
===================================================================
--- branches/0.8/html/include/Jaws/User.php	2012-08-10 15:25:38 UTC (rev 13364)
+++ branches/0.8/html/include/Jaws/User.php	2012-08-10 15:28:10 UTC (rev 13365)
@@ -99,7 +99,7 @@
                 }
 
                 // logon hours
-                $wdhour = explode(',', $GLOBALS['app']->UTC2UserTime(time(), 'w,G'));
+                $wdhour = explode(',', $GLOBALS['app']->UTC2UserTime(time(), 'w,G', true));
                 $lhByte = hexdec($result['logon_hours']{$wdhour[0]*6 + floor($wdhour[1]/4)});
                 if ((pow(2, fmod($wdhour[1], 4)) & $lhByte) == 0) {
                     return Jaws_Error::raiseError(_t('GLOBAL_ERROR_LOGIN_LOGON_HOURS'),



More information about the Jaws-commits mailing list