File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -221,11 +221,16 @@ function (Filter\Condition $condition) {
221
221
222
222
$ contactId = $ this ->getContactId ($ identifier );
223
223
if ($ contactId !== null ) {
224
- $ db -> update ( ' contact ' , [
224
+ $ toUpdate = [
225
225
'full_name ' => $ data ['full_name ' ],
226
- 'username ' => $ data ['username ' ] ?? null ,
227
226
'default_channel_id ' => $ this ->getChannelId ($ data ['default_channel ' ])
228
- ], ['id = ? ' => $ contactId ]);
227
+ ];
228
+
229
+ if (! empty ($ data ['username ' ])) {
230
+ $ toUpdate ['username ' ] = $ data ['username ' ];
231
+ }
232
+
233
+ $ db ->update ('contact ' , $ toUpdate , ['id = ? ' => $ contactId ]);
229
234
230
235
$ db ->delete ('contact_address ' , ['contact_id = ? ' => $ contactId ]);
231
236
$ db ->delete ('contactgroup_member ' , ['contact_id = ? ' => $ contactId ]);
You can’t perform that action at this time.
0 commit comments