Hey all,

I need a little help on this one.

I have a custom block and I want to put in a link called "edit my profile". This link would point to www.domain.com/user/#/edit/personal%20information where # is for the user number.

My other links print in a list like this:

  $items[] = l("Post New Entry","node/add/blog");
  $items[] = l("Tell My Friends","tellmyfriends");
  $items[] = l("Logout","logout");
  print theme('item_list', $items);

What would be the code for the edit my profile link?

A separate but related question: is it possible to move the user picture upload box (currently under account settings) to the personal information section?

Thanks so much!

- Dan

Comments

coreyp_1’s picture

  global $user;
  $items[] = l("Edit My Profile","user/".$user->uid."/edit/personal%20information");
  $items[] = l("Post New Entry","node/add/blog");
  $items[] = l("Tell My Friends","tellmyfriends");
  $items[] = l("Logout","logout");
  print theme('item_list', $items);

Not sure about your other question.

potential’s picture

That worked well.

One other thing I'm working on is if the user did not upload a pic, it will display a link to do so in the profile page where the picture would normally be. Here's the code I have now:

<?php if($user->picture): ?> 
  <div class="picture">
  <img src="/ <?php print $user->picture ?> ">
  </div>
<?php endif; ?> 

<?php if(!$user->picture && // IN HERE GOES THE ARGUMENT FOR WHEN THE CURRENT USER MATCHES WHOS PROFILE IT IS): ?> 
  <div class="picturelink">
  <?php print l("Add My Picture","user/" . $user->uid. "/edit")?>
  </div>
<?php endif; ?> 

I know I'm close, just can't get that one part.