added logic / Form stuff

This commit is contained in:
StockiP
2022-05-02 09:21:19 +02:00
parent 664bf41c91
commit 4e6af105f5
6 changed files with 115 additions and 55 deletions

View File

@@ -4,20 +4,21 @@ include($_SERVER['DOCUMENT_ROOT'] . '/logic/testinput.php');
class DataHandler
{
public function registerUser($username, $password, $email, $phone, $salutation, $firstname, $lastname, $role, $street, $streetnumber, $postalcode, $country)
public function registerUser($data)
{
$username = testinput($username);
$password = testinput($password);
$email = testinput($email);
$phone = testinput($phone);
$salutation = testinput($salutation);
$firstname = testinput($firstname);
$lastname = testinput($lastname);
$role = testinput($role);
$street = testinput($street);
$streetnumber = testinput($streetnumber);
$postalcode = testinput($postalcode);
$country = testinput($country);
$username = testinput($data->username);
$password = testinput($data->password);
$email = testinput($data->email);
$phone = testinput($data->phone);
$salutation = testinput($data->salutation);
$firstname = testinput($data->firstname);
$lastname = testinput($data->lastname);
$street = testinput($data->street);
$streetnumber = testinput($data->streetnumber);
$postalcode = testinput($data->postalcode);
$country = testinput($data->country);
$password = password_hash($password, PASSWORD_DEFAULT);
require($_SERVER['DOCUMENT_ROOT'] . '/config/setupDBAccess.php');