Skip to content

Commit

Permalink
Flextype Admin Panel: possibility to register two admins! #183 #182
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jul 6, 2019
1 parent b148738 commit c565a12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/plugins/admin/app/Controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function login(Request $request, Response $response) : Response
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'
Expand Down Expand Up @@ -91,7 +91,7 @@ public function registration(Request $request, Response $response) : Response
{
$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')) {
Expand Down

0 comments on commit c565a12

Please sign in to comment.