AdminAccountPage: Fix `Variable '$groups, $users' are probably undefined`
This commit is contained in:
parent
d1bfde0dc5
commit
01352cf6c2
|
@ -101,6 +101,7 @@ class AdminAccountPage extends Form
|
||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$choices = array();
|
$choices = array();
|
||||||
|
$groups = [];
|
||||||
if ($this->backendConfig['backend'] !== 'db') {
|
if ($this->backendConfig['backend'] !== 'db') {
|
||||||
$choices['by_name'] = $this->translate('By Name', 'setup.admin');
|
$choices['by_name'] = $this->translate('By Name', 'setup.admin');
|
||||||
$choice = isset($formData['user_type']) ? $formData['user_type'] : 'by_name';
|
$choice = isset($formData['user_type']) ? $formData['user_type'] : 'by_name';
|
||||||
|
@ -116,6 +117,7 @@ class AdminAccountPage extends Form
|
||||||
$choice = isset($formData['user_type']) ? $formData['user_type'] : 'new_user';
|
$choice = isset($formData['user_type']) ? $formData['user_type'] : 'new_user';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$users = [];
|
||||||
if (in_array($this->backendConfig['backend'], array('db', 'ldap', 'msldap'))) {
|
if (in_array($this->backendConfig['backend'], array('db', 'ldap', 'msldap'))) {
|
||||||
$users = $this->fetchUsers();
|
$users = $this->fetchUsers();
|
||||||
if (! empty($users)) {
|
if (! empty($users)) {
|
||||||
|
|
Loading…
Reference in New Issue