We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 977e62b commit a3d97f1Copy full SHA for a3d97f1
src/Entity/User.php
@@ -158,4 +158,20 @@ public function setGoogleActivationSecret(string|null $googleActivationSecret):
158
{
159
$this->googleActivationSecret = $googleActivationSecret;
160
}
161
+
162
+ public function __serialize(): array
163
+ {
164
+ $vars = get_object_vars($this);
165
+ unset($vars['imageFile']);
166
+ return $vars;
167
+ }
168
169
+ public function __unserialize(array $data): void
170
171
+ foreach ($data as $key => $value) {
172
+ if (property_exists($this, $key)) {
173
+ $this->$key = $value;
174
175
176
177
0 commit comments