Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to figure out how to link a logged-in user to his profile settings, but I can't seem to find a function that generates this link (like wp_settings_url() or wp_profile_url()) Is there a default function for this?

share|improve this question

3 Answers 3

up vote 11 down vote accepted

The user edit page of the current user is /wp-admin/profile.php, so you can just do admin_url( 'profile.php' ), which is the way it is used in the WP source code.

share|improve this answer
    
awesome, thanks :) –  Stephan Muller Jan 10 '11 at 12:22
    
Worked perfectly for me as well, nice elegant solution. Thanks Jan. –  Lars Koudal Mar 16 '11 at 14:48

Combination of other answers:

<a href="<?php echo admin_url( 'user-edit.php?user_id=' . $curauth->ID, 'http' ); ?>">Edit Profile</a>

I'm using this on author.php, that's why I've already got the user ID on the page. That way an admin gets a link to edit that user's profile rather than their own.

share|improve this answer

Possibly something like this?

<?php get_currentuserinfo();

global $user_ID;
if (” != $user_ID) { ?>

<a href="/wp-admin/user-edit.php?user_id=<?php the_author_ID(); ?>">Edit
Profile</a>

<?php } ?>
share|improve this answer
    
Haven't had chance to check this out but should work! –  Vince Pettit Jan 7 '11 at 12:43
    
Vince Pettit, Amazing solution! Thanks! –  user4019 Mar 18 '11 at 2:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.