diff --git a/include/class.user.php b/include/class.user.php index 3ba2b54ae1d3cb0d7f194036d1a5412199b1afd4..ad3302a2c3b95c3442abefb95faf53b7768a0324 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -1069,7 +1069,13 @@ class UserAccountModel extends VerySimpleModel { } function getUser() { - $this->user->set('account', $this); + // FIXME: The ORM will expect a ClientAccount instance as the + // User.account relationship is defined thusly; however, $this is an + // instance of UserAccount. Therefore we will (cast) to a + // ClientAccount instance first. This could be better rectified by + // collapsing UserAccount into ClientAccount. + $acct = new ClientAccount($this->ht); + $this->user->set('account', $acct); return $this->user; }