Skip to content

Commit

Permalink
Flatten user meta keys, close xwp#1038
Browse files Browse the repository at this point in the history
  • Loading branch information
lkraav committed Nov 13, 2023
1 parent ec96a02 commit ce4f09a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/class-log.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ function ( $var ) {
}
);

// Add user meta to Stream meta.
$stream_meta['user_meta'] = $user_meta;
// Flatten and add user meta to Stream meta.
foreach ( $user_meta as $k => $v ) {
$stream_meta[ sprintf( 'user_meta[%s]', $k ) ] = $v;
}

if ( ! empty( $user->roles ) ) {
$roles = array_values( $user->roles );
Expand Down

0 comments on commit ce4f09a

Please sign in to comment.