diff --git a/Account/Account.php b/Account/Account.php index 6bdcb5c53..ef3431b72 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -155,6 +155,7 @@ class Account */ public function __construct() { + $this->createdAt = new \DateTime('now'); } /** @@ -367,7 +368,7 @@ class Account throw new \InvalidArgumentException(); } - $this->email = $email; + $this->email = mb_strtolower($email); } /** @@ -421,4 +422,8 @@ class Account $this->lastActive = new \DateTime('NOW'); } + public function setCreatedAt(\DateTime $created) { + $this->createdAt = $created; + } + }