chg: [User] Entity - added rearrangeForAPI() to rearrange meta fields
parent
2a31e39762
commit
ce6575cfb6
|
@ -48,4 +48,14 @@ class User extends AppModel
|
||||||
return (new DefaultPasswordHasher())->hash($password);
|
return (new DefaultPasswordHasher())->hash($password);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function rearrangeForAPI(): void
|
||||||
|
{
|
||||||
|
if (!empty($this->meta_fields)) {
|
||||||
|
$this->rearrangeMetaFields();
|
||||||
|
}
|
||||||
|
if (!empty($this->MetaTemplates)) {
|
||||||
|
unset($this->MetaTemplates);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue