diff options
Diffstat (limited to 'app/class/controllerconnect.php')
-rw-r--r-- | app/class/controllerconnect.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/class/controllerconnect.php b/app/class/controllerconnect.php index 303abf2..bf1b72d 100644 --- a/app/class/controllerconnect.php +++ b/app/class/controllerconnect.php @@ -37,11 +37,13 @@ class Controllerconnect extends Controller if (isset($_POST['pass'])) { $this->user = $this->usermanager->passwordcheck($_POST['pass']); if($this->user != false) { - $this->usermanager->connectcounter($this->user); - $this->usermanager->writesession($this->user); - $_SESSION['workspace']['showleftpanel'] = true; - $_SESSION['workspace']['showrightpanel'] = false; - + if($this->user->expiredate() === false || $this->user->level() === 10 || $this->user->expiredate('date') > $this->now) { + $this->user->connectcounter(); + $this->usermanager->add($this->user); + $this->usermanager->writesession($this->user); + $_SESSION['workspace']['showleftpanel'] = true; + $_SESSION['workspace']['showrightpanel'] = false; + } } } if ($id !== null) { |