Browse Source

checkredis

yijia
娄梦宁 4 years ago
parent
commit
50adbb2afa
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      addons/unishop/controller/User.php

+ 3
- 3
addons/unishop/controller/User.php View File

@@ -47,7 +47,7 @@ class User extends Base
$ordinary_user_end=Config::getByName('ordinary_user_end')['value'];
$ordinary_user_start=strtotime($ordinary_user_start);
$ordinary_user_end=strtotime($ordinary_user_end);
if (time()<$ordinary_user_end && time()>$ordinary_user_start){
if (time()>$ordinary_user_end || time()<$ordinary_user_start){
$this->auth->logout();
$this->error('It\'s not time to open', $data);
}
@@ -57,9 +57,9 @@ class User extends Base
$privilege_user_end=Config::getByName('privilege_user_end')['value'];
$privilege_user_start=strtotime($privilege_user_start);
$privilege_user_end=strtotime($privilege_user_end);
if (time()<$privilege_user_end && time()>$privilege_user_start){
if (time()>$privilege_user_end || time()<$privilege_user_start){
$this->auth->logout();
$this->error('It\'s not time to open '.$privilege_user_start." ".$privilege_user_end, $data);
$this->error('It\'s not time to open ');
}
}



Loading…
Cancel
Save