Create a Role

$nl_roles = new NLRoles();

class NLRoles{

public function __construct(){
add_action('init',array(&$this,'init'));
}

public function init(){
add_role('nl_document_user',__('Document User'),
array(
'read' => true, // true allows this capability
//'edit_posts' => true,
//'delete_posts' => false, // Use false to explicitly deny
)
);

}
}

Get User Roles In WordPress

$user = get_userdata( $user->ID );
$capabilities = $user->{$wpdb->prefix . 'capabilities'};

if ( !isset( $wp_roles ) )
$wp_roles = new WP_Roles();

foreach ( $wp_roles->role_names as $role => $name ) {

if ( array_key_exists( $role, $capabilities ) )
echo $role;
}