This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Mapping UIDs to usernames

Hi all,

I have some data that has been input into a table by various users, I'd like to take the UIDs from the table and map them to usernames.

I tried using $user->uid but that's silly because that gives me the current logged on users uid (usually mine).

I could I suppose, have the $user->username input along with the inserted data, but I thought it more elegant to grab the username from the main system rather than duplicate data in this way.

Looking forward to any responses.

Cheers,
--

ChrisP

How to Switch Pics?

How to switch pics in page? I have upload all pics to server but cant switch it on page.

$form_values does not return anything when form type is file

Hello everybody,

I have been trying to retrieve $form_values when submit function is called for a form when #type => 'file'. But form.inc does some convoluted and confusing transformation of $form_values when form type is 'file'.
form.inc line 660 :

Content aAdministration

Hello,
I am new to Drupal and am loving it. I've got a rather generic question.

How can I actually display the content of a page on another page, for example the content admin page where all nodes are getting listed?

print_r(theme_node_admin_nodes()); actually prints out the content administration form header.

How can I actually display the entire content admin page ?

Cheers

Memcached Is anyone working with it to improve performance? ---->http://www.danga.com/memcached/

Hi. Is anyone using Memcached to improve performance of their Drupal system? Is there a plan to implement it in later versions of Drupal?

Replacement view and hiding edit tab at my account

Hello,

I've spent 2 days trying to replace view and to hiding edit tab at my account menu but... it doesn't work.
This is my hook_menu code:

function my_user_menu($may_cache) {
  global $user;
  if (arg(0) == 'user' && is_numeric(arg(1)) && (arg(1) > 0) && ($user !== FALSE)) {
      
      $view_access = $user->uid == arg(1);
      $items = array();

      $items[] = array(
        'path' => 'user/'. $user->uid, 
        'title' => t('My Account'),
        'type' => MENU_DYNAMIC_ITEM, 
        'callback' => 'user_viewedit',
        'access' => $view_access
        );
     

      $items[] = array(
        'path' => 'user/'. $user->uid .'/view', 
        'title' => t('View'),
        'access' => $view_access, 
        'type' => MENU_DEFAULT_LOCAL_TASK, 
        'weight' => -10
        );         


      $items[] = array(
        'path' => 'user/'. $user->uid .'/test', 
        'title' => 'Test',
        'callback' => 'drupal_not_found', 
        'type' => MENU_LOCAL_TASK
      );
      
      $items[] = array(
        'path' => 'user/'. $user->uid .'/edit', 
        'title' => 'hidden tab?',
        'callback' => 'drupal_not_found', 
        'type' => MENU_CALLBACK
      );

        return $items;
  }
  
}

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions