mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-18 03:00:56 +01:00
Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop
# Conflicts: # classes/controller.php
This commit is contained in:
@@ -96,10 +96,10 @@ class AdminPlugin extends Plugin
|
||||
|
||||
// check for existence of a user account
|
||||
$account_dir = $file_path = $this->grav['locator']->findResource('account://');
|
||||
$user_check = (array) glob($account_dir . '/*.yaml');
|
||||
$user_check = glob($account_dir . '/*.yaml');
|
||||
|
||||
// If no users found, go to register
|
||||
if (!count($user_check) > 0) {
|
||||
if ($user_check == false || count((array)$user_check) == 0) {
|
||||
if (!$this->isAdminPath()) {
|
||||
$this->grav->redirect($this->base);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user