You are here

function _views_rdf_format_author in Views Datasource 7

Same name and namespace in other branches
  1. 6 views_rdf.module \_views_rdf_format_author()

Creates an author object to use in the headers of OPML and Atom documents

Parameters

$username:

Return value

unknown_type

3 calls to _views_rdf_format_author()
template_preprocess_views_views_rdf_style_doap in views/theme/views_views_rdf_style.theme.inc
Template preprocess for the DOAP vocabulary
template_preprocess_views_views_rdf_style_foaf in views/theme/views_views_rdf_style.theme.inc
Template preprocess for the FOAF vocabulary
template_preprocess_views_views_rdf_style_sioc in views/theme/views_views_rdf_style.theme.inc
Template preprocess for the SIOC vocabulary

File

./views_rdf.module, line 203
Module definition for views_rdf

Code

function _views_rdf_format_author($username) {
  $author = array();
  if (!$username) {
    $author["name"] = variable_get('anonymous', 'Anonymous');
    $author["email"] = variable_get('site_mail', 'none@none.info');
    return $author;
  }
  if (is_numeric($username)) {
    $user = user_load($username);
  }
  else {
    $user = user_load_by_name($username);
  }
  if (!$user) {

    //$author["name"] = variable_get('anonymous', ('Anonymous'));
    $author["name"] = variable_get('anonymous', 'Anonymous');
    $author["email"] = variable_get('site_mail', 'none@none.info');
    return $author;
  }
}