• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

modules/user/views_handler_field_user_link_edit.inc

00001 <?php
00007 class views_handler_field_user_link_edit extends views_handler_field_user_link {
00008   function render_link($data, $values) {
00009     // Build a pseudo account object to be able to check the access.
00010     $account = new stdClass();
00011     $account->uid = $data;
00012 
00013     if ($data && user_edit_access($account)) {
00014       $this->options['alter']['make_link'] = TRUE;
00015 
00016       $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
00017 
00018       $this->options['alter']['path'] = "user/$data/edit";
00019       $this->options['alter']['query'] = drupal_get_destination();
00020 
00021       return $text;
00022     }
00023   }
00024 }

Generated on Sun Feb 26 2012 12:52:51 for Views by  doxygen 1.7.1