Closed turtlepod closed 8 months ago
https://github.com/10up/10up-experience/blob/a815f9a61d2785cf3ff3d2de3ad586216643458e/includes/classes/SupportMonitor/ActivityLog.php#L137
In this log code, the default is "Subscriber" but in WordPress we can set the default Role. Maybe a better code is:
$role = ( ! empty( $userdata['role'] ) ) ? $userdata['role'] : get_option( 'default_role' );
After thinking about it, it actually better to simply use n/a if it's not available. A log need to simply log the actual data.
$role = ( ! empty( $userdata['role'] ) ) ? $userdata['role'] : 'n/a';
https://github.com/10up/10up-experience/blob/a815f9a61d2785cf3ff3d2de3ad586216643458e/includes/classes/SupportMonitor/ActivityLog.php#L137
In this log code, the default is "Subscriber" but in WordPress we can set the default Role. Maybe a better code is: