Model/User.php
public function setLastLogin($lastLogin)
    {
        if ($lastLogin instanceof DateTime) {
            $this->lastLogin = $lastLogin;
        } else {
            try {
                $this->lastLogin = new DateTime($lastLogin);
            } catch (\Exception $e) {
                $this->lastLogin = null;
            }
        }

        return $this;
    }
public function setLastLogin($lastLogin)
    {
        if ($lastLogin instanceof DateTime) {
            $this->lastLogin = $lastLogin;
        } else {
            try {
                $this->lastLogin = new DateTime($lastLogin);
            } catch (\Exception $e) {
                $this->lastLogin = null;
            }
        }

        return $this;
    }
Sets the "lastLogin" of the User.

@param DateTime $lastLogin

@return User