diff --git a/plugins/wporg-5ftf/includes/pledge-log.php b/plugins/wporg-5ftf/includes/pledge-log.php index 5c5d3a5..ee0a3d3 100644 --- a/plugins/wporg-5ftf/includes/pledge-log.php +++ b/plugins/wporg-5ftf/includes/pledge-log.php @@ -117,6 +117,9 @@ function add_log_entry( $pledge_id, $type, $message, array $data = array(), $use if ( $user_id ) { // The template defaults to the current user, so this function parameter shouldn't override unless it's different. $entry['user_id'] = $user_id; + + } elseif ( 'cli' === php_sapi_name() ) { + $entry['user_id'] = gethostname(); } add_post_meta( $pledge_id, LOG_META_KEY, $entry, false ); diff --git a/plugins/wporg-5ftf/views/log.php b/plugins/wporg-5ftf/views/log.php index 7742418..5351d08 100644 --- a/plugins/wporg-5ftf/views/log.php +++ b/plugins/wporg-5ftf/views/log.php @@ -36,9 +36,14 @@ namespace WordPressDotOrg\FiveForTheFuture\View;