Revize 77d279e5
Přidáno uživatelem Tomáš Pašek před více než 3 roky(ů)
application/model/DB.php | ||
---|---|---|
75 | 75 |
|
76 | 76 |
function createUser($userDetails) { |
77 | 77 |
$this->stmt = $this->pdo->prepare('INSERT INTO users (username, password, role) VALUES (:username, :password, :role)'); |
78 |
$password = password_hash($userDetails['username'], PASSWORD_DEFAULT);
|
|
78 |
$password = password_hash($userDetails['password'], PASSWORD_DEFAULT);
|
|
79 | 79 |
$this->stmt->bindParam(':username', $userDetails['username']); |
80 | 80 |
$this->stmt->bindParam(':password',$password); |
81 | 81 |
$this->stmt->bindParam(':role',$userDetails['role']); |
Také k dispozici: Unified diff
Oprava chyby při vytváření uživatele.