Leave it up to the database to decide what is the current time

This commit is contained in:
Johannes Meyer 2014-11-04 12:42:39 +01:00
parent e463ca836e
commit cad8f7538e
1 changed files with 2 additions and 3 deletions

View File

@ -67,13 +67,12 @@ class DbUserBackend extends UserBackend
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)
));
}