Skip to content
Snippets Groups Projects
Commit ca00f225 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix crash registering a user

parent 100e531c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment