You are here

function user_relationships_api_socnet_relation_type in User Relationships 6

return 'two-way' or 'one-way' depending on the relation type

File

user_relationships_api/user_relationships_api.socnet.inc, line 162
User Relationships implementation of http://drupal.org/project/drupal_universal_relation_api @author Alex Karshakevich http://drupal.org/user/183217

Code

function user_relationships_api_socnet_relation_type($relation_name = NULL) {
  $type = user_relationships_type_load(array(
    'name' => $relation_name,
  ));
  if (isset($type->is_oneway)) {
    return $type->is_oneway ? 'one-way' : 'two-way';
  }
}