diff --git a/CSS/Element/button.css b/CSS/Element/button.css index 13914dd..0c1296e 100644 --- a/CSS/Element/button.css +++ b/CSS/Element/button.css @@ -6,4 +6,5 @@ font-size: var(--font-size-text); border-radius: 3px; text-decoration: none; + cursor: pointer; } \ No newline at end of file diff --git a/CSS/style.css b/CSS/style.css index 46a6f7b..d56777e 100644 --- a/CSS/style.css +++ b/CSS/style.css @@ -38,7 +38,7 @@ h2 { } main { - margin-top: 135px; + margin-top: 190px; padding: 10px; } @@ -104,10 +104,6 @@ label.errorMsg { color: orange; } -input { - width: 300px; -} - input[type="submit"] { width: 100px; margin-left: 330px; diff --git a/Controller/UserController.php b/Controller/UserController.php index f927810..5cb2c1d 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -9,7 +9,6 @@ class UserController{ private $db; private $validData = array(); private $errors = array(); - private $labels = array("name" => "Name", "lastname"=> "Nachname", "email" => "E-Mail-Adresse", "password" => "Password", "role" => "Role"); public function __construct($view){ $this->db = new UserModel(); @@ -24,9 +23,17 @@ class UserController{ } + public function showUserLoginForm(){ + + } + public function register(){ - $this->db->createUser($this->labels); + $this->db->createUser($_POST); $this->view->setDoMethodName("showUserConfirmation"); $this->showUserConfirmation(); } + + public function login(){ + + } } \ No newline at end of file diff --git a/Model/UserModel.php b/Model/UserModel.php index de1a363..f3af5a4 100644 --- a/Model/UserModel.php +++ b/Model/UserModel.php @@ -11,8 +11,7 @@ class UserModel extends Database /** * @throws RandomException */ - public function createUser($values) - { + public function createUser($values){ $salt = bin2hex(random_bytes(16)); @@ -25,8 +24,6 @@ class UserModel extends Database $sql = "INSERT INTO user (`id`, `name`,`vorname`,`email`,`passwort`,`salt`,`role`) VALUES (:guid, :name, :firstname, :email, :password, :salt, :role)"; -var_dump($values); - try { $sth = $pdo->prepare($sql); $sth->execute([ diff --git a/Views/User/showUserConfirmation.phtml b/Views/User/showUserConfirmation.phtml index 41fa4f7..2788b36 100644 --- a/Views/User/showUserConfirmation.phtml +++ b/Views/User/showUserConfirmation.phtml @@ -2,7 +2,7 @@ include dirname(__DIR__).'/header.phtml'; ?> -

Der Benutzer wurde erfolgreich erstellt

+

Sie haben sich erfolgreich registriert

diff --git a/Views/User/showUserForm.phtml b/Views/User/showUserForm.phtml index 4c13acd..2ca254c 100644 --- a/Views/User/showUserForm.phtml +++ b/Views/User/showUserForm.phtml @@ -2,7 +2,7 @@ include dirname(__DIR__).'/header.phtml'; ?> -

Benutzer

+

Benutzer erstellen

Registrieren

@@ -14,10 +14,10 @@ - + - +

Wähle deine Rolle: