I want to get the user roles Just like getting node types using this
node_type_get_types();
is there anyway to get user roles using a function like this?
See the user_roles()
function which provides a list of all roles, or you can optionally filter on specific conditions (there are more details on the documentation page I linked to).