1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 13:52:56 +02:00

Flextype Admin Panel: possibility to register two admins! #183 #182

This commit is contained in:
Awilum
2019-07-06 16:14:18 +03:00
parent b14873885f
commit c565a12b37

View File

@@ -40,7 +40,7 @@ class UsersController extends Controller
if ((Session::exists('role') && Session::get('role') == 'admin')) {
return $response->withRedirect($this->router->pathFor('admin.entries.index'));
} else {
if ($users && count($users) > 0) {
if (count($users) > 0) {
return $this->container->get('view')->render(
$response,
'plugins/admin/views/templates/users/login.html'
@@ -91,7 +91,7 @@ class UsersController extends Controller
{
$users = $this->getUsers();
if ($users && count($users) > 0) {
if (count($users) > 0) {
return $response->withRedirect($this->router->pathFor('admin.users.login'));
} else {
if ((Session::exists('role') && Session::get('role') == 'admin')) {