Is there a direct URL to edit the users own usernode? It would be very helpful if there could be added a link like usernode/edit to reach the nodes edit page. If it's not possible, it would be a very nice feature.

Comments

Owen Barton’s picture

You can do this easily in a custom module by adding a menu item in hook_menu like:

  global $user;

  $items = array();
  $admin_access = user_access('administer users');

  // Control logic from user module  
  if (!$may_cache) {
    if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0) {
      $account = user_load(array('uid' => arg(1)));

        // This adds a menu item to edit the usernode
        $items[] = array('path' => 'user/'. arg(1) .'/profile', 'title' => t('Edit profile'),
          'callback' => 'drupal_get_form', 'callback arguments' => array(USERNODE_CONTENT_TYPE .'_node_form', usernode_get_node($account)),
          'access' => $admin_access || $user->uid == arg(1), 'type' => MENU_LOCAL_TASK, 'weight' => -5);
    }
  }

While we could add this to usernode module I am not sure if many people are using it in this way...

fago’s picture

thanks grugnog for sharing - I leave this open so that it's visible for others.

Pomliane’s picture

Status: Active » Closed (won't fix)

This version of Usernode is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.