aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerpage.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Controllerpage.php')
-rw-r--r--app/class/Controllerpage.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php
index c7e1f98..e864dd3 100644
--- a/app/class/Controllerpage.php
+++ b/app/class/Controllerpage.php
@@ -311,6 +311,25 @@ class Controllerpage extends Controller
$this->routedirect('home');
}
+ public function logout(string $id)
+ {
+ if (!$this->user->isvisitor()) {
+ $this->disconnect();
+ $this->routedirect('pageread', ['page' => $id]);
+ } else {
+ $this->routedirect('pageread/', ['page' => $id]);
+ }
+ }
+
+ public function login(string $id)
+ {
+ if ($this->user->isvisitor()) {
+ $this->showtemplate('connect', ['id' => $id, 'route' => 'pageread/']);
+ } else {
+ $this->routedirect('pageread/', ['page' => $id]);
+ }
+ }
+
public function delete($id)
{
$this->setpage($id, 'pagedelete');