1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-09 07:36:34 +02:00

Version 1.4.3: Register user functions,account-button, cleanup

This commit is contained in:
trendschau
2021-01-04 20:18:31 +01:00
parent cd8c67b5d1
commit 1f063a6778
20 changed files with 163 additions and 600 deletions

View File

@@ -1,35 +0,0 @@
<?php
namespace Typemill\Middleware;
use Slim\Interfaces\RouterInterface;
use Slim\Http\Request;
use Slim\Http\Response;
class RedirectIfNoAdmin
{
# NOT IN USE ANYMORE
/*
protected $router;
public function __construct(RouterInterface $router, $flash)
{
$this->router = $router;
}
public function __invoke(Request $request, Response $response, $next)
{
if(!isset($_SESSION['login']) || !isset($_SESSION['role']))
{
$response = $response->withRedirect($this->router->pathFor('auth.show'));
}
if($_SESSION['role'] != 'administrator')
{
$response = $response->withRedirect($this->router->pathFor('content.raw'));
}
return $next($request, $response);
}
*/
}