diff --git a/app/Controllers/Auth.php b/app/Controllers/Auth.php index 0b28f75..c96c7eb 100644 --- a/app/Controllers/Auth.php +++ b/app/Controllers/Auth.php @@ -82,6 +82,7 @@ public function createSession() public function createAccount() { + $accounts = model(Account::class); $formDataIsValid = $this->validate([ 'Name' => 'required|min_length[3]|max_length[25]', 'Surname' => 'required|min_length[3]|max_length[25]', @@ -98,6 +99,8 @@ public function createAccount() return view('auth/add-user', [ // add error to existing variables 'error' => $this->validator->getErrors(), + 'users' => $accounts->getUsers(), + 'pager' => $accounts->pager, ...self::$ADD_USER_CONFIG, ]); }