Leave it up to the database to decide what is the current time
This commit is contained in:
parent
e463ca836e
commit
cad8f7538e
|
@ -67,13 +67,12 @@ class DbUserBackend extends UserBackend
|
||||||
public function addUser($username, $password, $active = true)
|
public function addUser($username, $password, $active = true)
|
||||||
{
|
{
|
||||||
$stmt = $this->conn->getDbAdapter()->prepare(
|
$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(
|
$stmt->execute(array(
|
||||||
':name' => $username,
|
':name' => $username,
|
||||||
':active' => (int) $active,
|
':active' => (int) $active,
|
||||||
':password_hash' => $this->hashPassword($password),
|
':password_hash' => $this->hashPassword($password)
|
||||||
':ctime' => time()
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue