diff options
author | Camil Staps | 2016-08-01 09:15:36 +0200 |
---|---|---|
committer | Camil Staps | 2016-08-01 09:15:36 +0200 |
commit | 923aac957cc28723c622570d46d2a915c75df06f (patch) | |
tree | e4c6a3683f0f0781ed9545feb922e41a2e8d1e8b /include | |
parent | Internationalisation: email subjects (diff) |
Removed duplicate code
Diffstat (limited to 'include')
-rw-r--r-- | include/clients-new.php | 2 | ||||
-rw-r--r-- | include/users-new.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clients-new.php b/include/clients-new.php index d1cf503..fcb619e 100644 --- a/include/clients-new.php +++ b/include/clients-new.php @@ -23,7 +23,7 @@ require_once('./login-ajax.php'); $response = new Response(); try { - $client = BusinessAdmin::createClient($_pdo, $_REQUEST['name']); + $client = Client::create($_pdo, [$_REQUEST['name']]); if ($client === false) { $response->success = false; diff --git a/include/users-new.php b/include/users-new.php index 0582134..cc01af8 100644 --- a/include/users-new.php +++ b/include/users-new.php @@ -26,7 +26,7 @@ $response = new Response(); try { $pass = user::generateRandomPassword(); - $user = BusinessAdmin::createUser($_pdo, $_REQUEST['username'], $pass); + $user = User::create($_pdo, [$_REQUEST['username'], $pass]); if ($user === false) { $response->success = false; |