Skip to content

Commit

Permalink
Leave it up to the database to decide what is the current time
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed Nov 4, 2014
1 parent e463ca8 commit cad8f75
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/Icinga/Authentication/Backend/DbUserBackend.php
Expand Up @@ -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)
));
}

Expand Down

0 comments on commit cad8f75

Please sign in to comment.