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)
|
||||
{
|
||||
$choices = array();
|
||||
$groups = [];
|
||||
if ($this->backendConfig['backend'] !== 'db') {
|
||||
$choices['by_name'] = $this->translate('By Name', 'setup.admin');
|
||||
$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';
|
||||
}
|
||||
|
||||
$users = [];
|
||||
if (in_array($this->backendConfig['backend'], array('db', 'ldap', 'msldap'))) {
|
||||
$users = $this->fetchUsers();
|
||||
if (! empty($users)) {
|
||||
|
|
Loading…
Reference in New Issue