I'm not sure. I've just tested the above and it's working perfectly fine in my tests. Specifically I created the below test.
Global
Triggers: None
Type: CB Gallery
User: Self
Access: Everybody
Action
Mode: Item
Method: Create
Asset: profile.[user_id]
Link: LIVE_IMAGE_PATH_HERE
Title: Test
Owner: [user_id]
Load: By Asset, Link, and Owner
Output
Display: JSON
Layout:
Code:
if ( ! $actiondata['data1'] ) {
return [];
}
return [ 'id' => $actiondata['data1']->getInt( 'id' , 0 ),
'user_id' => $actiondata['data1']->getInt( 'user_id' , 0 ),
'asset' => $actiondata['data1']->getString( 'asset' , '' ),
'date' => $actiondata['data1']->getString( 'date' , '' ),
];
Method: PHP
This then gave me the following results.
Code:
{"id":30655,"user_id":1090,"asset":"profile.1090","date":"2023-09-18 14:15:01"}
So it seams to be working.