You are here

function flag_lists_user_page in Flag Lists 6

Same name and namespace in other branches
  1. 7.3 flag_lists.module \flag_lists_user_page()
  2. 7 flag_lists.module \flag_lists_user_page()

User flag page. Display a list of user-created flag lists.

1 string reference to 'flag_lists_user_page'
flag_lists_menu in ./flag_lists.module
Implementation of hook_menu().

File

./flag_lists.module, line 136
The Flag Lists module.

Code

function flag_lists_user_page($uid) {

  // Can we use our default view?
  if (module_exists('views')) {
    $view = views_get_view('flag_lists_user_lists', FALSE);
    if (!empty($view)) {
      $view
        ->set_display('default');
      $view
        ->set_arguments(array(
        $uid,
      ));
      $output = $view
        ->render();
      drupal_set_title($view->build_info['title']);
    }
    return $output;
  }
  else {
    return theme('flag_lists_user_page', $uid);
  }
}