Noted in admin/people

when we click on edit link, then we see a destination in url as admin/people,
which is convenient to return back, but can some one tell me where the destination fragment s formed.

thanks very much.

Comments

stefan lehmann’s picture

Common .. it's not so hard to find. Which module do you think renders the user list? It literally doesn't take more than 20 seconds to find the line.

qqboy’s picture

how ? i will see.

---
ok, in user_admin_account function, we see line 224

 $destination = drupal_get_destination();
 
// ---
// ---
// ---

   $options[$account->uid] = array(
      'username' => theme('username', array('account' => $account)),
      'status' =>  $status[$account->status],
      'roles' => theme('item_list', array('items' => $users_roles)),
      'member_for' => format_interval(REQUEST_TIME - $account->created),
      'access' =>  $account->access ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $account->access))) : t('never'),
      'operations' => array('data' => array('#type' => 'link', '#title' => t('edit'), '#href' => "user/$account->uid/edit", '#options' => array('query' => $destination))),
    );
  }

Thanks Stefan.

stefan lehmann’s picture

Well done! :-)