chg: [User] Entity - added rearrangeForAPI() to rearrange meta fields

cli-modification-summary
iglocska 2022-10-31 13:26:44 +01:00
parent 2a31e39762
commit ce6575cfb6
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 10 additions and 0 deletions

View File

@ -48,4 +48,14 @@ class User extends AppModel
return (new DefaultPasswordHasher())->hash($password);
}
}
public function rearrangeForAPI(): void
{
if (!empty($this->meta_fields)) {
$this->rearrangeMetaFields();
}
if (!empty($this->MetaTemplates)) {
unset($this->MetaTemplates);
}
}
}