public function logIn($user = null) { if (!is_object($user)) { $user = $this->createCustomer(); } $this->loginTo($user); return $user; }