aboutsummaryrefslogtreecommitdiff
path: root/app/class/user.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-08-09 00:17:08 +0200
committervincent-peugnet <v.peugnet@free.fr>2019-08-09 00:17:08 +0200
commit87ca0b50e624feacd2caff2057c5ebfb62a7977f (patch)
treeaf43a7da5414033813f414877e36a017ec56121d /app/class/user.php
parentef18c5f848a5e4d1239bdc1d89e0cc9f75a10512 (diff)
downloadwcms-87ca0b50e624feacd2caff2057c5ebfb62a7977f.tar.gz
wcms-87ca0b50e624feacd2caff2057c5ebfb62a7977f.zip
Users have now a connections counter
Diffstat (limited to 'app/class/user.php')
-rw-r--r--app/class/user.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/class/user.php b/app/class/user.php
index 645f73e..7a05f7b 100644
--- a/app/class/user.php
+++ b/app/class/user.php
@@ -9,6 +9,7 @@ class User
protected $passwordhashed = false;
protected $cookie = 0;
protected $columns = ['title', 'datemodif', 'datecreation', 'secure', 'visitcount'];
+ protected $connectcount = 0;
public function __construct($datas = [])
{
@@ -79,6 +80,11 @@ class User
return $this->columns;
}
+ public function connectcount()
+ {
+ return $this->connectcount;
+ }
+
// _______________________ S E T _______________________
@@ -135,6 +141,19 @@ class User
}
}
+ public function setconnectcount($connectcount)
+ {
+ if(is_int($connectcount) && $connectcount >= 0) {
+ $this->connectcount = $connectcount;
+ }
+ }
+
+
+
+
+
+ //____________________________________________________ F U N ____________________________________________________
+
@@ -183,6 +202,13 @@ class User
{
return $this->level === Modeluser::ADMIN;
}
+
+
+ public function connectcounter()
+ {
+ $this->connectcount ++;
+ }
+
}