/** * Adds the {@link $logged_at} property. */ public function to_array() { $array = parent::to_array(); if ($this->password) { $array['password'] = $this->password; } return $array; }