* userModel: call time() function to simplify code.

This commit is contained in:
liugang
2023-12-16 17:16:18 +08:00
parent f9c9a997e3
commit d16927814a
+1 -1
View File
@@ -2698,7 +2698,7 @@ class userModel extends model
$action = strtolower($action);
if($action == 'unbind' && empty($user->ranzhi)) return false;
if($action == 'unlock' && (strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) >= $config->user->lockMinutes * 60) return false;
if($action == 'unlock' && (time() - strtotime($user->locked)) >= $config->user->lockMinutes * 60) return false;
if($action == 'delete' && strpos($app->company->admins, ",{$user->account},") !== false) return false;
return true;