Skip to main content
added 4 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

You cannot use a wildcardmenu wildcards like that. You need to use the following code.

  <ul id="userNavigation">
    <li><?php echo l(t("Profile edit"), 'user/' . $GLOBALS['user']->uid . '/edit'); ?></li>
    <li><?php echo l(t("My posts"), 'user/' . $GLOBALS['user']->uid . '/track'); ?></li>
    <li class="exit"><?php echo l(t("Exit"), "user/logout"); ?></li>
  </ul>

The global $user is the user object for the currently logged-in user. Be careful: It is not a fully-loaded user object. If you need that, you should use the value returned from user_uid_optional_load().

You cannot use a wildcard like that. You need to use the following code.

  <ul id="userNavigation">
    <li><?php echo l(t("Profile edit"), 'user/' . $GLOBALS['user']->uid . '/edit'); ?></li>
    <li><?php echo l(t("My posts"), 'user/' . $GLOBALS['user']->uid . '/track'); ?></li>
    <li class="exit"><?php echo l(t("Exit"), "user/logout"); ?></li>
  </ul>

The global $user is the user object for the currently logged-in user. Be careful: It is not a fully-loaded user object. If you need that, you should use the value returned from user_uid_optional_load().

You cannot use menu wildcards like that. You need to use the following code.

  <ul id="userNavigation">
    <li><?php echo l(t("Profile edit"), 'user/' . $GLOBALS['user']->uid . '/edit'); ?></li>
    <li><?php echo l(t("My posts"), 'user/' . $GLOBALS['user']->uid . '/track'); ?></li>
    <li class="exit"><?php echo l(t("Exit"), "user/logout"); ?></li>
  </ul>

The global $user is the user object for the currently logged-in user. Be careful: It is not a fully-loaded user object. If you need that, you should use the value returned from user_uid_optional_load().

Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

You cannot use a wildcard like that. You need to use the following code.

  <ul id="userNavigation">
    <li><?php echo l(t("Profile edit"), 'user/' . $GLOBALS['user']->uid . '/edit'); ?></li>
    <li><?php echo l(t("My posts"), 'user/' . $GLOBALS['user']->uid . '/track'); ?></li>
    <li class="exit"><?php echo l(t("Exit"), "user/logout"); ?></li>
  </ul>

The global $user is the user object for the currently logged-in user. Be careful: It is not a fully-loaded user object. If you need that, you should use the value returned from user_uid_optional_load().