diff --git a/src/libraries/User.php b/src/libraries/User.php index 15214aa0..377fff01 100644 --- a/src/libraries/User.php +++ b/src/libraries/User.php @@ -708,9 +708,8 @@ public function setVerified() { `verified_datetime` = :dt WHERE `id` = :user_id; '); - $stmt->bindParam( - ':dt', $verified_datetime->format( 'Y-m-d H:i:s' ), PDO::PARAM_STR - ); + $dt = $verified_datetime->format( 'Y-m-d H:i:s' ); + $stmt->bindParam(':dt', $dt, PDO::PARAM_STR); // must be byref $stmt->bindParam(':bits', $options_bitmask, PDO::PARAM_INT); $stmt->bindParam(':user_id', $this->id, PDO::PARAM_INT); $successful = $stmt->execute();