hi @edumusa
To display the user’s email in the list for auditing purposes, you can add the following code snippet to your theme’s functions.php file. This will display an email column in the list. However, please note that it will not add the email column to the CSV export as it is not possible to override this functionality at the moment.
add_filter('faulh_admin_login_list_get_columns', 'faulh_admin_login_list_get_columns_custom');
function faulh_admin_login_list_get_columns_custom($columns)
{
if (!isset($columns['cb'])) {
return $columns;
}
$columns['email'] = 'Email';
return $columns;
}
add_filter('manage_faulh_admin_custom_column', 'manage_faulh_admin_custom_column_custom', 10, 3);
function manage_faulh_admin_custom_column_custom($value, $item, $column_name)
{
if ('email' == $column_name) {
$user = WP_User::get_data_by('ID', $item['user_id']);
if ($user instanceof \stdClass) {
$value = $user->user_email;
}
}
return $value;
}