For the first part of your question, you can add new columns to the users table.
Its in two steps: first you need to register the columns, then output information for each row.
To add new columns, you hook into the manage_users_columns
filter:
function yourdomain_manage_users_columns( $columns ) {
// $columns is a key/value array of column slugs and names
$columns[ 'custom_field' ] = 'Custom Field';
return $columns;
}
add_filter( 'manage_users_columns', 'yourdomain_manage_users_columns', 10, 1 );
Then you need to output your custom field using the manage_users_custom_column
filter:
function yourdomain_manage_users_custom_column( $output, $column_key, $user_id ) {
switch ( $column_key ) {
// look for the slug you registered
case 'custom_field' :
// get your custom field, parse it however you want
$value = get_user_meta( $user_id, 'custom_field', true );
// return the value
return $value;
break;
default: break;
}
// if no column slug found, return default output value
return $output;
}
add_filter( 'manage_users_custom_column', 'yourdomain_manage_users_custom_column', 10, 3 );
As for user activation:
Maybe the WP_options table isn’t the best way to go about it, as it will grow quickly, slow your website be hard to maintain.
You might want to create a new User Role for non-activated users and set it as default; which you can change easily through the admin interface.
If you are adding this code via a plugin, you might do:
function yourdomain_add_user_role() {
// capabilities
$caps = array(
'level_0' => true, // inherit subscriber capabilities
'read' => false // but can't read posts, etc
);
// ads the inactive user role
add_role(
'inactive', // Role slug
'Inactive Account', // Role name
$caps // capabilities
);
}
register_activation_hook( __FILE__, 'yourdomain_add_user_role' );
Have a look at the codex for a (long) list of user roles and capabilities: https://codex.wordpress.org/Roles_and_Capabilities
Hope that helps!