diff --git a/library/Icinga/Authentication/Backend/DbUserBackend.php b/library/Icinga/Authentication/Backend/DbUserBackend.php index 0d79ca028f..876f1ff070 100644 --- a/library/Icinga/Authentication/Backend/DbUserBackend.php +++ b/library/Icinga/Authentication/Backend/DbUserBackend.php @@ -67,13 +67,12 @@ public function hasUser(User $user) public function addUser($username, $password, $active = true) { $stmt = $this->conn->getDbAdapter()->prepare( - 'INSERT INTO icingaweb_user VALUES (:name, :active, :password_hash, :ctime);' + 'INSERT INTO icingaweb_user VALUES (:name, :active, :password_hash, now(), DEFAULT);' ); $stmt->execute(array( ':name' => $username, ':active' => (int) $active, - ':password_hash' => $this->hashPassword($password), - ':ctime' => time() + ':password_hash' => $this->hashPassword($password) )); }